Taru
Taru

Reputation: 2732

msvcp100.dll missing

I wrote a program in C++ using Visual Studio 2010 But when I run it on some computers with WinXP it says "Cannot start because MSVCP100.dll wasn't found"

How do I prevent such dependencies on dlls that do not come with windows?

Thank you.

Upvotes: 0

Views: 2028

Answers (2)

seak
seak

Reputation: 125

Sorry for the late respones, but yes you can prevent this dependency, just go to solution property of yopur project, go to C/C++ > Code Generator and in Runtime Library change it from MDd to MTd, will include statically the dependent libraries, and not in run time, like this avoid Run time errors while try to run the Dll.

Upvotes: 1

Ryan
Ryan

Reputation: 521

you cannot prevent this dependency, as it's the core runtime library of Visual C++. Instead, include the Visual C++ 2010 Redistributable package with your application (usually a separate link is enough since most people have it installed already)

However, if in fact your program cannot start because a dll with D at the end such as MSVCP100D.dll then you need to build your program in release mode, which by default switches the run time to a non-debug version. You need to be careful to nut out any other included static and dynamic libraries you're including in your project to make sure all debug or all release versions match for your builds.

If you are having trouble finding which sub-projects are referencing the debug versions, you can download and run depends.exe and browse through the exe file to see.

Upvotes: 1

Related Questions