Static Linking

Posted on 2005-04-06
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
    LVL 3

    Accepted Solution

    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

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Motorola device cold boot 3 344
    Turn a spreadsheet into a vba executable. 2 56
    dog bark java program 15 69
    java ^ examples 8 51
    Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    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.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now