Make the program compiled by VC independent of msvcr80.dll, msvcr90.dll, msvcr100.dll, and other files.

Source: Internet
Author: User

Under normal circumstances, when we use VC to compile an EXE for a console/Win32 ProjectProgram(The MFC program is not considered here), it will depend on msvcrxx. DLL file (XX is the version number corresponding to different VC, vc2005 is 80, vc2008 is 90, and vc2010 is 100). When you release a program, you need to copy the corresponding DLL, inconvenient.

By using the following method, you can make the EXE independent of these DLL (but the generated exe will be much larger)

Take the English version of vc2010 as an example. Switch to the Solution Explorer view, right-click the project, select properties, and select release in the configuration option, choose configuration Properties> C/C ++> code generation> Runtime Library and select/mt. Re-build the project in release mode and generate an EXE file that does not depend on msvcr100.dll in the release folder.

The following describes the meanings of the four Runtime Library options:

(D Indicates DLL, and D indicates Debug)

MT (multi-threaded): multi-threaded version

MTD (multi-threaded Debug): multi-thread debugging version

MD (multi-threaded DLL): multi-thread dll version

MDD (multi-threaded DLL Debug): multi-thread debugging dll version

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.