About C Runtime Library

Source: Internet
Author: User
Tags import database

The following error occurs: libcmtd. Lib (crt0dat. OBJ): Error lnk2005: _ exit, which is already defined in msvcrtd. Lib (msvcr71d. dll ).

Cause: Run-Time Library• Run-time Library is the standard library provided by the compiler and provides some basic library functions and system calls.
The run-time library we generally use is C run-time libraries. Standard C ++ libraries is also available.
C run-time libraries implements the ansi c standard library. The CRT directory of the VC installation directory contains most of the source code of the C run-time library. C run-time libraries has a static library version, a dynamic link library version, a single-thread version, a multi-thread version, and a debug and non-debug version. • Dynamic Link Library version:
/MD multithreaded DLL import database msvcrt. Lib
/MDD debug multithreaded DLL use the import library msvcrtd. Lib • static library version:
/Ml single-threaded uses static library libc. Lib
/MLD debug single-threaded use static library libcd. Lib
/MT multithreaded uses the static library libcmt. Lib
/MTD debug multithreaded uses the static library libcmtd. Lib

To use this Runtime Library Ignore these libraries
Single thread (libc. Lib) Libcmt. Lib, msvcrt. Lib, libcd. Lib, libcmtd. Lib, and msvcrtd. Lib
Multithreading (libcmt. Lib) Libc. Lib, msvcrt. Lib, libcd. Lib, libcmtd. Lib, and msvcrtd. Lib
Multiple Threads Using DLL (msvcrt. Lib) Libc. Lib, libcmt. Lib, libcd. Lib, libcmtd. Lib, and msvcrtd. Lib
Debug a single thread (libcd. Lib) Libc. Lib, libcmt. Lib, msvcrt. Lib, libcmtd. Lib, and msvcrtd. Lib
Debug multiple threads (libcmtd. Lib) Libc. Lib, libcmt. Lib, msvcrt. Lib, libcd. Lib, and msvcrtd. Lib
Multi-thread Debugging Using DLL (msvcrtd. Lib) Libc. Lib, libcmt. Lib, msvcrt. Lib, libcd. Lib, libcmtd. Lib
Solution: attribute, linker, input, ignore specified library libc. lib, libcmt. lib, msvcrt. lib, libcd. lib, libcmtd. lib (this is something I need to ignore. You can select it based on the actual situation of your project .) Update (20060205 ): 5.When the link fails to open mfc4xx. Lib, this is because vc7 has upgraded the mfc dll.

Solution:
Attribute, linker, input, and add mfc71d. lib to additional dependencies. /Nodefalib lib (ignore Library) indicates the library ignored by the linker when the linker resolves external references.

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.