How to fix error MSVCP120D.dll in Visual Studio 2015?

12,009

OpenCV-2.4.10.exe comes with runtime binary dlls built to work with runtimes from vc10 (vs2010), vc11 (vs2012) and vc12 (vs2013).

These DLL files use MSVCP100.dll, MSVCP110.dll and MSVCP120.dll respectively, and if you have installed Visual Studio 2015 you should find them in your System32 (or SysWOW64) directory.

The MSVCP120D.dll error appears when your application tries to load the DEBUG version of the DLL binaries. You do not have MSVCP120D.dll unless you have Visual Studio 2013 installed on your system. To solve this problem, use the Release runtime instead of the Debug runtime.

All you need to do is exclude the DEBUG lib files from your project. This means including only the lib files without the suffix 'd'. (ie. include opencv_core2410.lib instead of opencv_core2410d.lib)

HTH

Extras: You don't really need to load the Debug binaries, unless you need to debug openCV's source code. If you do, there's still a way. Download the openCV source code, use CMake to create a VS2015 project. You can then build your own dll binaries using the latest runtime from VS2015.

Share:
12,009

Related videos on Youtube

Ada S
Author by

Ada S

Updated on October 15, 2022

Comments

  • Ada S
    Ada S about 1 year

    Hello I have downloaded and unzipped OpenCV-2.4.10.exe on my PC. Then created a new Win32 Console application project in VS 2015, set all the Paths in Project properties, set the environmental variables in Win8.1. When I'm trying to start the program in debugging mode I get the "The program can't start because MSVCP120D.dll is missing from your computer. Try reinstalling the program to fix this problem".

    Then, I downloaded the Visual C++ redistributable for Visual Studio 2015 But the problem still remains. What should I do to use OpenCV in VS 2015?

    • PaulMcKenzie
      PaulMcKenzie almost 8 years
    • Micka
      Micka almost 8 years
      vc120 is visual studio 2013 c++ compiler. Download opencv source code and compile it with visual studio 2015 (vc140). You could install visual studio 2013 redistributable, but you SHOULD NOT compile with incompatible libraries!
    • Miki
      Miki almost 8 years
      Or you can use OpenCV 3.1 which have prebuilt binaries for VS2015.