如何修复Visual Studio 2015中的错误MSVCP120D.dll? [英] How to fix error MSVCP120D.dll in Visual Studio 2015?

查看:201
本文介绍了如何修复Visual Studio 2015中的错误MSVCP120D.dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我已经在我的PC上下载并解压缩了OpenCV-2.4.10.exe.然后在VS 2015中创建一个新的Win32 Console应用程序项目,在Project属性中设置所有路径,在Win8.1中设置环境变量.当我尝试以调试模式启动该程序时,出现该程序无法启动,因为您的计算机缺少MSVCP120D.dll.请尝试重新安装该程序以解决此问题". /p>

然后,我下载了Visual Studio 2015可再发行的Visual C ++,但问题仍然存在.在VS 2015中使用OpenCV应该怎么做?

解决方案

OpenCV-2.4.10.exe附带了运行时二进制dll,用于与 vc10 (vs2010), vc11 (vs2012)和 vc12 (vs2013).

这些DLL文件分别使用MSVCP100.dll,MSVCP110.dll和MSVCP120.dll,如果已安装Visual Studio 2015,则应在System32(或SysWOW64)目录中找到它们.

当您的应用程序尝试加载DLL二进制文件的 DEBUG 版本时,出现MSVCP120 D .dll错误.除非您在系统上安装了Visual Studio 2013,否则您没有MSVCP120 D .dll.要解决此问题,请使用Release运行时而不是Debug运行时.

您需要做的就是从项目中排除 DEBUG lib文件.这意味着仅包含没有后缀"d"的lib文件. (即,包括opencv_core2410.lib而不是opencv_core2410 d .lib)

HTH

其他: 除非您需要调试openCV的源代码,否则您实际上不需要加载Debug二进制文件.如果您这样做,还是有办法的.下载openCV源代码,使用CMake创建VS2015项目.然后,您可以使用VS2015中的最新运行时来构建自己的dll二进制文件.

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?

解决方案

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.

这篇关于如何修复Visual Studio 2015中的错误MSVCP120D.dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆