I have an application that uses wxWidgets as a the UI framework and compiled using Visual Studio 2010 on Windows 7 machine. I am linking wxWidgets statically. My application also uses a C dll for processing.
Now I am trying to run this application on another freshly installed machine (Win7). This doesn’t have a developer environment setup. I have copied the application’s executable file, supporting dll and other supporting text files to this machine.
When the application starts, it gave the following message.
The program failed to start because MSVCR100d.DLL is missing from your computer. Try reinstalling the program to fix this problem.
I figured that my C library was using debug version and compiling that in Release mode solved the issue. But it still asks for MSVCR100.dll. I think the way to workaround is installing the VC++ redistributable package. But not sure that is the best approach.
Here are my questions.
- How do you normally deploy the application? Do you provide the VC++ redistributable package too?
- I am compiling this on a 64bit machine and testing on a 32 bit. Is this OK? Or do I need to compile separately for 32 bit?
- Can I statically link against the run time library? So that I can just ship my DLLs and other files.
- What are the other common things that I should be aware of when building executable which will run on many machines?
Following are some of my settings which may be relevant.
General :
Use of MFC : Use standard windows libraries
Use of ATL : Not using
C/C++ :
Runtime library : Multi-threaded(/MT)
Any help would be appreciated.
It is trying to use a debug only DLL on a machine that doesn’t have it.
Your problem arises from the fact that msvcr100d.dll is a debug only dll indicated by the trailing d.
Thus you are NOT using /MT you are actually using /MDd. If you used /MT then it would nto try and load that DLL …
So in answer to your questions: