Release Application looking for MSVCR110d.dll

前端 未结 5 1863
忘掉有多难
忘掉有多难 2021-01-04 14:08

I\'ve built a c++ application with Visual Studio 2012. I\'ve tried to get it to run on another machine without VS2012 installed but it will not run. It keeps looking for msv

相关标签:
5条回答
  • 2021-01-04 14:18

    Make sure that not only the solution you're making is built using Release mode configurations, but all dependencies are also using the non-debug DLLs. As you've written you are using imported libraries (freeglut), so check those too. Since freeglut is open-source you might want to built it from scratch too (using release mode), instead of using a pre-built DLL.

    0 讨论(0)
  • The quick and easy way is to copy msvcr110d.dll from your development machine to the target machine. Make sure you're using the one from the directory corresponding to the architecture for which your app is built (Windows\System32 or Windows\SysWOW64).

    0 讨论(0)
  • 2021-01-04 14:21

    The d.dll suffix means debug version of C++ runtime DLL. This means your exe is debug build, which requires MSVCR110d.dll.

    You should deploy release build of your exe, which requires MSVCR110.dll.

    Ask the user to install VC2012 runtime redistributable, MSVCR110.dll will be installed.

    0 讨论(0)
  • 2021-01-04 14:26

    The problem is most likely that freeglut is a debug library, not a release library, and is therefore trying to link against the debug-mode DLL. There probably exists a release-mode version of freeglut as well, and you need to change your project configuration to use that freeglut library instead.

    However, there's a deeper issue here: How can you check this for certain? What if there's another library causing the issue, or what if it's some obscure setting in your own executable file? I've found the tool Dependency Walker to be very helpful. Its page claims that it's included with Visual C++, but I couldn't find it in any of my Visual C++ installs (perhaps because I did not install all optional components). Note that the included help file didn't work for me either, but you can view the help file contents on the web page.

    freeglut viewed in Dependency Walker

    A view of freeglut.dll's dependencies. I've highlighted the particular C Runtime used by this version of FreeGLUT--yours is probably different. The list of functions on the right shows you what MSVCRT exports, and the highlighted ones are the ones that appear to be used. For example, it looks like this version of FreeGLUT uses operator new. If your names are mangled, hit F10 to undecorate the C++ names and see what the functions are. All the missing DLLs appear be "delay-loaded" DLLs (see the hourglass), so they are probably not an issue.

    I've used Dependency Walker to figure out a number of nasty DLL issues. While it's perhaps overkill for your particular problem, I think it's nice to know what tools let you actually see the problem, instead of just inferring that it's there.

    0 讨论(0)
  • 2021-01-04 14:30

    You need to have Visual C++ Redistributable for Visual Studio 2012 installed even if you built Release EXE or DLL and trying to use them on the machine without Visual Studio 2012.

    0 讨论(0)
提交回复
热议问题