Msdn library description

Source: Internet
Author: User
Msdn Home> msdn library> development tools and ages> Visual Studio 6.0> visual c and C ++ 6.0> using C run-time library debugging support

C run-time debug Libraries

The following table lists the DEBUG Versions of the C run-time library files, along with their associated compiler options and environment variables. for a list of the release versions of these libraries, see C run-time libraries.

Prior to Visual C ++ 4.2, the C run-time libraries contained the iostream library functions. in Visual C ++ 4.2, the old iostream library functions were removed from libcd. lib, libcmtd. lib, and msvcrtd. lib. this change was made because the standard C ++ library was added to Visual C ++, and it contains a new set of iostream libraries.

Two sets of iostream functions are now supported in Visual C ++. the old iostream functions now exist in their own libraries: libcid. lib, libcimtd. lib, and msvcirtd. lib. the new iostream functions, as well as other new functions, exist in the Standard C ++ libraries: libcpd. lib, libcpmtd. lib, and msvcprtd. lib.

The standard C ++ Library and the old iostream library are incompatible and only one of them can be linked with your project. see the Standard C ++ library overview and make the old iostream library the default for details.

When you build a debug version of your project, one of the basic C run-time debug libraries (libcd. lib, libcmtd. lib, and msvcrtd. lib) is linked by default, depending on the compiler option you choose (single-threaded, multithreaded, or DLL ). depending on the headers you use in your code, a debug library from the Standard C ++ libraries or one from the old iostream libraries may also be linked.

  • If you include a standard C ++ library header in your code, a standard C ++ library will be linked in automatically by Visual C ++ at compile time. For example:
   #include <ios> 
  • If you include an old iostream library header, an old iostream library will be linked in automatically by Visual C ++ at compile time. For example:
   #include <ios.h>

Note that headers from the Standard C ++ Library and the old iostream library cannot be mixed.

Headers determine whether a standard C ++ library, an old iostream library, or neither will be linked. compiler Options determine which of the libraries to be linked is the default (single-threaded, multithreaded, or DLL ). when a specific library compiler option is defined, that library is considered to be the default and its environment variables are automatically defined.

C run-time debug Library (without iostream) Characteristics Option Defined
Libcd. Lib Single-threaded, static Link /MLD _ Debug
Libcmtd. Lib Multithreaded, static Link /MTD _ Debug,_ Mt
Msvcrtd. Lib Multithreaded, dynamic link
(Import library for msvcrtd. dll) 1
/MDD _ Debug,_ Mt,_ DLL
1 in place of the "X" in the DLL name, substitute the major version numeral of Visual C ++ that you are using. for example, if you are using Visual C ++ version 4, then the library name wocould be msvcr40d. DLL.

Standard C ++ debug Library Characteristics Option Defined
Libcpd. Lib Single-threaded, static Link /MLD _ Debug
Libcpmtd. Lib Multithreaded, static Link /MTD _ Debug,_ Mt
Msvcprtd. Lib Multithreaded, Dynamic Link (import library for msvcrtd. dll) /MDD _ Debug,_ Mt,_ DLL

Iostream debug Library Characteristics Option Defined
Libcid. Lib Single threaded, static Link /MLD _ Debug
Libcimtd. Lib Multithreaded, static Link /MTD _ Debug,_ Mt
Msvcirtd. Lib Multithreaded, Dynamic Link (import library for msvcirtd. dll) /MDD _ Debug,_ Mt,_ DLL

The DEBUG Versions of the library functions differ from the release versions mainly in that debug information was provided ded when they were compiled (using the/z7 or/Zi compiler option), optimization was turned off, and source code is available. A few of the debug library functions also contain asserts that verify parameter validity.

Using one of these debug libraries is as simple as linking it to your application with the/debug: Full linker option set. You can then step directly into almost any run-time function call.



Manage your profile | Legal | Contact Us | Msdn Flash newsletter 2006 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement


 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.