Steffen
Steffen

Reputation: 13958

MS VC++ how to build DLL without requiring vc redist

I'm trying to build a simple .Net wrapper around some basic C++ code.

The C++ code does not rely on anything in the vcredist dlls, so I'm wondering if I can setup my project, so it doesn't require those dlls to work ?

I'd hate to have my users download and run vcredist, just for a simple DLL to work.

Upvotes: 7

Views: 6120

Answers (1)

RichieHindle
RichieHindle

Reputation: 281875

You need to link your DLL with the "Use the CRT as a static library" option:

Project properties / Configuration / C/C++ / Code Generation / Runtime library / Multithreaded (ie. not any of the "DLL" options).

Upvotes: 11

Related Questions