Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Compile Solution in Debug Mode Because MSVCR100D.dll is Missing

I am running Microsoft Visual Studio Express 2012 for Windows Desktop on a 64 bit machine with windows 8.

I create a completely new Win32 Console Application (in C++) and accept the default options. I then build and run the solution in both debug and release modes and it works all find and dandy. Next I configure the include and library directories for the dynamic SFML library. I link to the debug and release .lib files and put the debug and release .dll files in the proper directories. I then add some simple code which uses the library, build and run the application in debug mode and I get this error: "The program can't start because MSVCR100D.dll is missing from your computer. Try reinstalling the program to fix this problem." If I build and run the application in release mode it works with no errors. (And yes I have the redistributables installed 32 and 64 bit.) Now from what I understand and according to this thread that .dll file is for debugging only and is not included in the redistributable package (which would explain why it doesn't work in debug mode). The answer says that developers have it installed with visual studio by default. This is obviously not the case as evidence from the error and I've reinstalled visual studio and restarted my computer twice now.

In conclusion, how do I simply compile my solution in debug mode without getting this error?

I'm afraid someone will mark this as a duplicate so here we go:

  1. LINK - "...you appear to be linking to the debug version of the runtime, it is not normal to distribute apps linked against the debug version of the runtime."

    Doesn't pertain to me because I'm not distributing this app, just trying to run it in debug mode.

  2. LINK - "I compiled my program using Microsoft visual c++ 2010 Express Edition and tried to run it on another machine that did not have the same compiler."

    This person get's the error when he runs what hes compiled on a different computer, not when actually compiling the application.

  3. LINK - "If you get this error for your release build..."

    I dont.

  4. LINK - "You can compile your project in "Release"..."

    My project is not ready to be released therefore I should compile my project in debug mode.

like image 420
ProgrammerGuy123 Avatar asked Jan 05 '13 22:01

ProgrammerGuy123


1 Answers

MSVCR100D.dll is the dll for Visual Studio 10, so somewhere something is depending on it (the SFML dlls?). Whatever you compile (in debug mode) with Visual Studio 2012 will require MSVCR110D.dll, which you should have available on your machine as part of the installation.

I suggest you build SFML yourself on your own version of Visual Studio, it's pretty easy. In fact, the binaries available on the site as part of the SFML 2.0 RC are rather old and you'll do yourself a huge favor by building from the latest sources, as a lot of fixes and improvement were applied in the meantime.

(Also, definitely use 2.0 instead of 1.6. The site is rather misleading, but on the SFML forums virtually everyone will recommend you use the last version)

like image 53
Andrei Tita Avatar answered Sep 28 '22 18:09

Andrei Tita