5

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.

Searock
  • 6,278
  • 11
  • 62
  • 98

1 Answers1

8

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).

asdfjklqwer
  • 3,536
  • 21
  • 19
  • Do you know what to change in Code Generation? Is it Runtime Library? – Searock Mar 09 '11 at 10:44
  • 3
    Alternatively you could install the VC++ 2010 run-time libraries (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en) on the WinXP machine, but this would only help if you built your app for a Retail configuration (the 'D' in MSVCR100D.dll indicates you're building for Debug). You're not allowed to distribute the Microsoft debug DLLs to other machines. – PhilMY Mar 09 '11 at 22:04
  • @PhilMY Thanks for your valuable advice. : ) – Searock Mar 10 '11 at 04:02