Background of the Microsoft C Run-time Libraries

The Microsoft C Run-time Libraries

纯C运行库:

 

Pure C run-time library

Characteristics

Compiler Option

Preprocessor directives

LIBC.LIB

Single-threaded, static link.

/ML

-

LIBCMT.LIB

Multithreaded, static link.

/MT

_MT

MSVCRT.LIB

Multithreaded, dynamic link (import library for MSVCR70.DLL).  Be aware that if you use the Standard C++ Library, your program will need MSVCP70.DLL to run.

/MD

_MT, _DLL

LIBCD.LIB

Single-threaded, static link (debug).

/MLd

_DEBUG

LIBCMTD.LIB

Multithreaded, static link (debug).

/MTd

_DEBUG, _MT

MSVCRTD.LIB

Multithreaded, dynamic link (import library for MSVCR70D.DLL) (debug)

/MDd

_DEBUG, _MT, _DLL

The Standard C++ Library(标准C++运行库)

VC中有2中标准C++库

1)old iostream library

Old iostream library

Characteristics

Compiler Option

Preprocessor directives

LIBCI.LIB

Single-threaded, static link.

/ML

-

LIBCIMT.LIB

Multithreaded, static link.

/MT

_MT

MSVCIRT.LIB

Multithreaded, dynamic link (import library for MSVCI70.DLL).

/MD

_MT, _DLL

LIBCID.LIB

Single threaded, static link.

/MLd

_DEBUG

LIBCIMTD.LIB

Multithreaded, static link.

/MTd

_DEBUG, _MT

MSVCIRTD.LIB

Multithreaded, dynamic link (import library for MSVCI70D.DLL).

/MDd

_DEBUG, _MT, _DLL

2) new iostream library

Standard C++ Library

Characteristics

Compiler Option

Preprocessor directives

LIBCP.LIB

Single-threaded, static link

/ML

 -

LIBCPMT.LIB

Multithreaded, static link

/MT

_MT

MSVCPRT.LIB

Multithreaded, dynamic link (import library for MSVCP70.dll)

/MD

_MT, _DLL

LIBCPD.LIB

Single-threaded, static link

/MLd

_DEBUG

LIBCPMTD.LIB

Multithreaded, static link

/MTd

_DEBUG, _MT

MSVCPRTD.LIB

Multithreaded, dynamic link (import library for MSVCP70.DLL)

/MDd

_DEBUG, _MT, _DLL

 

两种库不兼容,只有一个可以链接到我们的工程上面去。:)

如果你使用标准C++头(e.g. #include<iostream>),VC编译器会自动选择标准C++库;而使用老式的头(e.g. #include<iostream.h>),VC编译器会自动选择 旧的库(old iostream library)。


 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值