MSVCP110D.dll and Visual Studio 2013

I am trying to run a program compiled in Visual Studio 2013. However, I get an error

The program can't start because MSVCP110D.dll is missing from your computer. Try reinstalling the program to fix this problem. 

This is not a very useful mistake. However, after some Googling, I found that it (apparently) is trying to dynamically load the standard c++ , and to get around this I need to specify the /MT option, not the /MD option. This leaves me with a few questions:

  • What exactly does this do?
  • What are the benefits of /MD rather than /MT ? I mean, there must be a reason why these are the default options ...
  • How can I get a .dll search and force Visual Studio to use it? I downloaded this one , but honestly I don’t know exactly how to use it.
  • Most importantly, how do I get this error to go away and run my program?

Additional info: I compile in Release mode using x64 build.

+6
source share
1 answer

The problem is that you are mixing different versions of Visual Studio with Qt, which was compiled using a different compiler. Remember that each version of Visual Studio will have its own runtime / CRT. Qt dlls that were compiled using Visual Studio 2012 and will depend on the Visual Studio 2012 runtime environment. They will not use the 2013 runtime environment.

The solution to this problem is to recompile all your code and dependent / dll libraries with the same compiler.

Note: Some users will try to simply install a dynamic runtime (or recompile dependent libraries with static CRT) from another version of Visual Studio, but this is not a solution to this problem, mainly because each runtime has its own independent heap. Having separate heaps can lead to random crashes caused by allocating memory in one heap, and then trying to free it in another heap. Since heaps do not exchange allocation or release information, this causes damage to the heap. In my experience, a problem does not always cause an instant crash. Failure may or may not occur during the next distribution of the corrupt heap, so debugging this situation can be very frustrating.

+14
source

Source: https://habr.com/ru/post/954374/


All Articles