简体   繁体   English

缺少MSVCP100D.dll(OpenCV)Visual Studio 2013

[英]MSVCP100D.dll is missing (OpenCV) Visual Studio 2013

So, in Visual Studio 2013 I created a program in which I use OpenCV. 因此,在Visual Studio 2013中,我创建了一个使用OpenCV的程序。 But when I want to compile the program, there is an error that the MSVCP100D.dll is missing. 但是当我想编译程序时,会出现MSVCP100D.dll丢失的错误。 I compile it in Debug version and I don't want to compile the program in Release version, so I need this file. 我在Debug版本中编译它,我不想在Release版本中编译程序,所以我需要这个文件。

I tried to install the Microsoft Visual C++ 2010 Redistributable Package , but it is already on my computer. 我尝试安装Microsoft Visual C ++ 2010 Redistributable Package ,但它已经在我的计算机上。 Should I download the single file (MSVCP100D.dll) and paste it in C:\\windows\\system32\\? 我应该下载单个文件(MSVCP100D.dll)并将其粘贴到C:\\ windows \\ system32 \\? Because there I can find the MSVCP100.dll file, but not the MSVCP100D.dll file. 因为在那里我可以找到MSVCP100.dll文件,但不能找到MSVCP100D.dll文件。

I also read related questions about this problem, but it didn't help. 我也读过有关这个问题的相关问题,但没有帮助。

Edit: And now the MSVCP110D.dll is missing too. 编辑:现在MSVCP110D.dll也丢失了。 Same error, but now the MSVCP110D.dll file. 同样的错误,但现在是MSVCP110D.dll文件。

您有一些在Visual Studio 2010中编译的代码。重新编译Visual Studio 2013中的代码以摆脱MSVCP100D.dll依赖项(将其替换为MSVCP120D.dll)。

Solution (Worked for me): In your Visual Studio project properties, under Linker>General>Additional Library Directories, use $(OPENCV_DIR)\\x64\\vc12\\lib (For your system this may change depending on whether you use x86 or x64 version). 解决方案(适合我):在Visual Studio项目属性中,在“ 链接器”>“常规”>“其他库目录”下,使用$(OPENCV_DIR)\\ x64 \\ vc12 \\ lib (对于您的系统,这可能会根据您使用的是x86还是x64版本而更改)。 Then your program should run. 然后你的程序应该运行。 At least it worked for me :) 至少它对我有用:)

Explanation: I had the same problem with same version of OpenCV and VS. 说明:我在相同版本的OpenCV和VS中遇到了同样的问题。 After a lot of research I found out that the problem might be incompatibility of OpenCV's pre-built binaries with Visual Studio 2013 . 经过大量研究后,我发现问题可能是 OpenCV的预构建二进制文件与Visual Studio 2013不兼容

@Sheng Jiang's answer helped me. @Sheng Jiang的回答帮助了我。 I used dependency walker and found that opencv_core2410d.dll depended on MSVCP100D.dll because opencv libraries that I was using were complied using Visual Studio 2010 (placed in vc10 folder) and MSVCP100D.dll is associated with Visual Studio 2010. 我使用了依赖walker ,发现opencv_core2410d.dll依赖于MSVCP100D.dll,因为我使用的opencv库是使用Visual Studio 2010(放在vc10文件夹中)编译的,而MSVCP100D.dll是与Visual Studio 2010相关联的。

One option was to recompile the OpenCV code with Visual Studio 2013 (as suggested by Sheng Jiang's answer above). 一种选择是使用Visual Studio 2013重新编译OpenCV代码(正如Sheng Jiang上面的答案所示)。 But this was unnecessary since OpenCV 2.4.10 already provides pre-built libraries built using Visual Studio 2013. These pre-built libraries are in the C:\\opencv\\build\\x64\\vc12 folder (exact path might differ for your machine). 但这是不必要的,因为OpenCV 2.4.10已经提供了使用Visual Studio 2013构建的预构建库。这些预构建的库位于C:\\ opencv \\ build \\ x64 \\ vc12文件夹中(确切路径可能因机器而异)。

Here comes the importance of vc10, vc11 and vc12 libraries . 这就是vc10,vc11和vc12库重要性 You choose the folder corresponding to the version of Visual Studio you are using. 您选择与您正在使用的Visual Studio版本对应的文件夹。 My mistake was to choose vc10 instead of vc12. 我的错误是选择vc10而不是vc12。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM