VS2012 MSVCR120D.dll is missing

只谈情不闲聊 提交于 2019-12-18 12:22:05

问题


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.

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.

If I try to compile the project in release mode using non-debug osg libraries everything is fine and I can normally run the project without errors.

Referring to this question I was trying to play with MFC and Runtime Library settings but only release libraries work at all.

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).

#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:

General settings of project C/C++ Code Generation submenu


回答1:


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 Walker or install the MSVC 2013 redistributables download from here



来源:https://stackoverflow.com/questions/23114427/vs2012-msvcr120d-dll-is-missing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!