[Last Call] Learn how to a build a cloud-first strategyRegister Now


Static Linking

Posted on 2005-04-06
Medium Priority
Last Modified: 2013-11-20

in my VC++ settings I can static link the MFC. But is it possible to link static the msvcr70, msvcp70 and the msvci70 so that it is not needed to install the DLL of this Runtimes onto target system?

Some Guru here who can explain this to me?

Question by:Ocrana
1 Comment

Accepted Solution

mactep13 earned 750 total points
ID: 13719688
In the project file properties, goto Configuration Properties | C/C++ | Code Generation. There, you will see an option for Runtime Library. Set Either MultiThreaded or Multi-Threaded Debug or Single-Threaded or Single-Threaded Debug. Do not use DLL as that will force DLL to link at run-time. My recomendation is to use Multi-Thread. However, if you're linking to a static lib and/or DLL, then this setting MUST match what the lib or DLL was compiled with. You CAN NOT use Single-Threaded  in your lib and specify Multi-Threaded in the exe or vice versa.

Hope this helps.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month18 days, 14 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question