Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VC++ programs build in Windows 7 don't run on Windows Xp

I have created a small WIN32 Console Application in Visual C++ in Windows 7.

When I try to run this application on Windows Xp it gives me an error saying

This application has failed to start because MSVCR100D.dll was not found. Re-installing the application may fix this problem.

So how do I statically build this application so that it contains MSVCR100D.dll ? or

do I have to copy MSVCR100D.dll form Windows 7 and paste it some where in Windows Xp ?

Thanks.

like image 374
Searock Avatar asked Mar 09 '11 10:03

Searock


1 Answers

MSVCR100D.dll isn't a Win7 DLL, it's an MSVC2010 DLL. You can use static linking by changing RuntimeLibrary from MD(d) to MT(d) in the project properties (under C/C++ -> Code Generation).

like image 102
asdfjklqwer Avatar answered Nov 15 '22 09:11

asdfjklqwer