9

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.

Community
  • 1
  • 1
ProgrammerGuy123
  • 357
  • 1
  • 5
  • 12
  • Are you using SFML compiled for another version of MSVC++? You'll either need to get the right version or compile it from source yourself using your compiler. +1 for research effort though. – Seth Carnegie Jan 05 '13 at 22:46
  • The file you need is not a redistributable file, you only get it when you have VS2010 installed on your machine. You'll need to obtain a VS2012 build of the SFML library to get ahead. Which looks like it will be difficult, it is not available from the SFML site yet. – Hans Passant Jan 05 '13 at 22:58
  • Try downloading VS 2010 Express and extracting the file you need from it maybe. Also +1 for all those LINKs. – user541686 Jan 05 '13 at 22:59

3 Answers3

2

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)

Andrei Tita
  • 1,226
  • 10
  • 13
1

This message generally states that the dll is referred to directly or indirectly in your application and is missing.

The 'D' at the end show us this is the Debug version of the file, this is DLL file is provided with the Visual Studio 2010 installation. So the MSVCR100D.dll would be provided with the installation of Visual Studio 2010.

Of course, you could be missing other versions 2008 (MSVCR90D) 2010 (MSVCR100D) 2012 (MSVCR110D) or the 2013 (MSVCR120D), each dll is provided according to the Visual Studio version.

There are a few ways to solve this:

  1. Check to be sure that you're compiling all the components of your project in Release mode. If this does not solve the issue continue to the next steps.
  2. You could solve this locally by installing Visual Studio 2010 on your machine. This is not what I would recommend, but it would surely overcome the issue
  3. You could also download the file from this third party website and copy it to your projects bin: http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d
    This option is the LEAST recommended option.
  4. Run dependency Walker and see what file depends on the MSVCR100D.dll and the try and fix that file in order to break your dependency. You can download depends here: http://www.dependencywalker.com/

    Check to be sure that you're project is linking the correct version of the CRT and any other libraries you may be using (e.g., MFC, ATL, etc.)

Note: Installing the redistributables alone will NOT solve this problem, since the redistributables only contain the release version of the file MSVCR100.dll (notice no 'D')

Merav Kochavi
  • 4,223
  • 2
  • 32
  • 37
0

MSVCR100D is part of the 2010 Visual Studio package - indicating that some components of your system are compiled with the older version of Visual Studio, so you will need to install the Visual Studio 2010 version - you can probably still develop with the 2012 version, just as long as [parts of] the 2010 is on the machine.

Or you need to recompile some components that your application depends on to use the 2012 (msvcr110d) libraries - if you have all the source code, that would be my preferrred method.

Mats Petersson
  • 126,704
  • 14
  • 140
  • 227
  • The **debug** version (MSVCR100D) is **not** part of the Visual Studio 2010 redistributable libraries. The debug version ships with Visual Studio exclusively. – IInspectable Jan 05 '13 at 23:09