none
Static linking in vs2010 run-time

    Question

  • Hi

    Seems a few friends of mine are having problems running my new VS2010 C++ builds, they get missing MSVCR.DLL file errors and such.

    I'm thinking they need to install the run-time redistributable package, but is a bit awkward to ask that of them.

    Is there any way I can build/link the binaries to help them out, ideally I'd like to make a full static link with all libraries, I just don't know the setting...

    Is it enough to set "Link Library Depencies" to "No"?

     

     

    Note:

    I know this in neither elegant or intended, but it's the easiest from _their_ perspective, which is what counts!

     


    • Moved by Victor_Chen Tuesday, September 28, 2010 6:02 AM C++ build error (From:MSBuild)
    Sunday, September 26, 2010 9:20 PM

Answers

  • Here is your most important setting:

    Under Configuration Properties, C/C++, Code Generation, Runtime Library -> MultiThreaded (/MT)

    In addition, if using MFC:

    Configuration Properties, General, Use of MFC -> Use MFC in a Static Library

    In addition, if using ATL:

    Configuration Properties, Genera, Use of ATL -> Static Link to ATL

     

    Tuesday, September 28, 2010 4:52 PM

All replies

  • Hi Sune,

     

    Thanks for your post.

    I think this issue is more relevant to VC++ build, and I'm going to move it to VC++ forum.

    Hope you can get more information there.

    Good Luck.

     

    Best Regards,

    Ziwei Chen

     

     

    Tuesday, September 28, 2010 6:00 AM
  • Here is your most important setting:

    Under Configuration Properties, C/C++, Code Generation, Runtime Library -> MultiThreaded (/MT)

    In addition, if using MFC:

    Configuration Properties, General, Use of MFC -> Use MFC in a Static Library

    In addition, if using ATL:

    Configuration Properties, Genera, Use of ATL -> Static Link to ATL

     

    Tuesday, September 28, 2010 4:52 PM