Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"program can't start because msvcp100.dll is missing" for Every single code

This error is taking toll of my training schedule.

The program can't start because...

Everytime I create any C++ application in my VS2010, It runs fine on my machine but if I run it on different machine, It starts with this error. Error goes if I copy msvcp100.dll in System Folder then it shouts for some other DLL. It requires some 5-6 different DLLs.

Most irritating part is even if I write a simple Console based Addition program, It gives this error. (I should not but)I would have agree if I design some fancy forms and all... But for simple Addition program????

Am I missing out somethings in Settings? or VS2010 to blame??

Somewhat related question: this But this problem seems different

like image 826
Swanand Avatar asked Sep 04 '12 08:09

Swanand


People also ask

Where is MSVCP100 dll installed?

In the vast majority of cases, the solution is to properly reinstall msvcp100. dll on your PC, to the Windows system folder. Alternatively, some programs, notably PC games, require that the DLL file is placed in the game/application installation folder.

Can't start because msvcr100 dll is missing?

If you're seeing the message 'The program can't start because MSVCR100. dll is missing from your computer. Try reinstalling the program to fix the problem', you'll need to manually install the file for yourself.


2 Answers

By default, MSVC projects are set to link against the dynamic run time library which generates a dependency on the visual C++ run time redistributable. As you have already found out, this dependency is not guaranteed so your install utility has to install the visual c++ run time first.

You can avoid this by changing your project settings. Load the project properties and go to: "Configuration Properties"/"C/C++"/"Code Generation"

  • In the item labelled "Runtime Library", select "Multi Threaded (/MT)"
  • for the release version"Multi Threaded Debug (/MTd)" for the debug version.

You have to be careful while doing this that all the other libraries that your application links are also compiled against the static run time.

like image 138
Jon Trauntvein Avatar answered Oct 21 '22 23:10

Jon Trauntvein


You need to have Visual C++ Libraries installed if you want to run your app.

like image 37
YohannP Avatar answered Oct 21 '22 21:10

YohannP