C++ VS2012 MSVCR120D.dll 丢失
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23114427/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
VS2012 MSVCR120D.dll is missing
提问by Kalam
I am trying to set up my project in VS2012 to successfully compile and run an OSG code for debugging. I am also using OSG debug libraries. Compilation and linking end successfully but after I run the binary I get an error saying that MSVCR120D.dll
is missing.
我正在尝试在 VS2012 中设置我的项目以成功编译和运行 OSG 代码以进行调试。我也在使用 OSG 调试库。编译和链接成功结束,但在我运行二进制文件后,我收到一条错误消息,指出MSVCR120D.dll
缺少该文件。
I was looking for a solution to this error the whole day and it doesn't make sense to me, because I am using VS2012 that should use MSVCR110D.dll
. I also don't have this dll in
C:\Windows\System32
, there's only MSVCR120.dll
and its older versions.
我一整天都在寻找解决这个错误的方法,这对我来说没有意义,因为我使用的 VS2012 应该使用MSVCR110D.dll
. 我也没有这个 dll
C:\Windows\System32
,只有MSVCR120.dll
它的旧版本。
If I try to compile the project in release mode using non-debugosg libraries everything is fine and I can normally run the project without errors.
如果我尝试使用非调试osg 库在发布模式下编译项目,一切都很好,我可以正常运行项目而不会出错。
Referring to thisquestion I was trying to play with MFC
and Runtime Library
settings but only release libraries work at all.
提到这个问题,我试图玩MFC
和Runtime Library
设置,但只有发布库才有效。
I need to run it with debug libraries because I want to use Visual Leak Detector that doesn't work with release libraries. This is part of the code I'm using (OSG libs are compiled with the same VS2012).
我需要使用调试库运行它,因为我想使用不适用于发布库的 Visual Leak Detector。这是我正在使用的代码的一部分(OSG 库是用相同的 VS2012 编译的)。
#include "stdafx.h"
#include <windows.h>
// osg libs
#include <osgViewer/Viewer>
int main(int argc, char **argv) {
osgViewer::Viewer viewer;
while (!viewer.done()) {
viewer.frame();
}
return 0;
}
Here are screenshots of the settings of my project that causes the error:
以下是导致错误的项目设置的屏幕截图:
采纳答案by Bruno Ferreira
At least one of the libraries you are using is compiled using VC12(2013), so either recompile them (you may see which library is compiled on VC12 using Dependency Walkeror install the MSVC 2013 redistributables download from here
您正在使用的库中至少有一个是使用 VC12(2013) 编译的,因此要么重新编译它们(您可能会看到哪个库是使用Dependency Walker在 VC12 上编译的,或者从此处安装 MSVC 2013 可再发行组件)