Dec 8, 2011 at 9:20pm UTC
Hi all,
I'm experiencing with C++ but I've the next problem:
When I send my .exe file to people who has not installed Visual Studio, the program does not work:
"Could not find MSVCR100.dll"
Does anyone know how I can solve this? Do I have to include this DLL file to my program, in that case: how?
Greets
Dec 8, 2011 at 9:35pm UTC
Thanks a lot! Problem solved. :)
Dec 8, 2011 at 9:38pm UTC
Noooo! Do not do that, it is a horrible solution.
Change your build configuration from Debug to Release.
This removes the dependency, makes the EXE smaller, and it runs faster.
Last edited on Dec 8, 2011 at 9:38pm UTC
Dec 8, 2011 at 9:40pm UTC
MSVCR100.dll is still required for release builds. They just don't require MSVCR100D .dll anymore.
Last edited on Dec 8, 2011 at 9:41pm UTC
Dec 8, 2011 at 9:44pm UTC
Are you sure? That sounds stupid...maybe in the Release settings it just needs to be changed from Multithreaded Executable to Executable (or something along those lines)? I seem to remember something like this...
Dec 9, 2011 at 1:25am UTC
You can statically link to the runtime by passing the /MT switch to the compiler.
Edit: You can do this from within Visual Studio by using:
Tools -> Options -> C++ -> Code Generation -> Runtime Library
and setting it to: Multi-threaded (/MT) or Multi-threaded Debug (/MTd)
Last edited on Dec 9, 2011 at 1:32am UTC