How to Static Link VC Runtime in Visual C++?


C Runtime Library (CRT) for native code is redistributed in DLL such as msvcrversion.dll. This is required for all application compiled under Microsoft Visual Studio. Typically, you do not need to compile the CRT as part of the application because these CRT dll can be found in the operation system. However, you’ll still be able to include these CRT as part of your application.

Goto Configuration Properties, Navigate to C/C++ and Code Generation, Select ‘Multithreaded’ /MT instead of ‘Multithreaded DLL’ /MD.

static-link-visual-studio How to Static Link VC Runtime in Visual C++? Visual Studio

static-link-visual-studio

You’ll observe slightly increase in the size of the binaries but this is normal because you have included the CRT! However, you ‘ll lose the ability to upgrade the CRT versions for your binaries.

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
206 words
Last Post: Some Thoughts on VPS v.s. Dedicated Server
Next Post: How to Check Server Response Time using cURL command line?

The Permanent URL is: How to Static Link VC Runtime in Visual C++?

Leave a Reply