Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ executable - MSVCR100.dll not found error

I've downloaded and compiled an open-source C++ application, Frhed.

When I run the version I've compiled, it demands MSVCR100 and few other dll files (part of Visual C++ redistributable). However, when I run the original precompiled Frhed executable, it runs without any C++ redistributable package installed.

Do I have to modify any compilation options in order to unlink the program from the C++ redistributable libraries?

like image 660
SharpAffair Avatar asked Aug 08 '11 01:08

SharpAffair


People also ask

Why is msvcr100 dll missing?

This message is caused by a missing Windows component not being present on the device. To resolve this issue, please install the 'Microsoft 2010 C++ redistributable (x86)' package from Microsoft's website to your device. This process should take approximately 5 minutes.


1 Answers

The original program is probably statically linked, whereas you are trying to dynamically link your executable, which results in a smaller file, but a dependency on functions inside MSVCR100.dll (v10 of the Microsoft C Runtime Library), which would have been included inside the executable if you were statically linking.

To statically link DLLs, go into your project properties and change the build mode from MD to MT. In Visual Studio 2010/2012, that project property is C/C++ -> Code Generation -> Runtime Library.

like image 85
foxy Avatar answered Sep 30 '22 01:09

foxy