简体   繁体   English

找不到MSVCP110D.dll

[英]MSVCP110D.dll not found

I'm trying to make a game using SFML. 我正在尝试使用SFML制作游戏。 I did a part of it on Visual Studio 2012 and Windows 7. I tried to run the game on another PC that uses Windows XP, but I got an error "MSVCP110D.dll was not found". 我在Visual Studio 2012和Windows 7上做了一部分。我试图在另一台使用Windows XP的PC上运行游戏,但出现错误“找不到MSVCP110D.dll”。 I saw another topic in this forum that says to compile the code in Release mode, but when I choose the "Release" option before compiling, Visual Studio underlines everything that is releted with SFML. 我在这个论坛上看到了另一个主题,该主题说要在“发布”模式下编译代码,但是当我在编译前选择“发布”选项时,Visual Studio会强调用SFML删除的所有内容。 It can't find the library that I have included "SFML/Graphics.hpp". 它找不到我包含的“ SFML / Graphics.hpp”库。 In "Debug" mode everything is OK. 在“调试”模式下,一切正常。 Do you have any idea how I can run my game on different PC (Windows XP or Windows 7)? 您是否知道如何在其他PC(Windows XP或Windows 7)上运行游戏?

I changed the properties of the project to compile for Windows XP. 我更改了项目的属性以针对Windows XP进行编译。 Without this option when I try to run the game on XP, in error occurs "Not a valid 32 bit application". 如果没有此选项,则当我尝试在XP上运行游戏时,错误发生“无效的32位应用程序”。

Everything is working now. 现在一切正常。 I changed all setting for release mode. 我更改了释放模式的所有设置。 On my Win XP PC I installed C++ Redistribution 2012. But what if I send the game to person who don't have C++ Redistribution 2012? 在Win XP PC上,我安装了C ++ Redistribution2012。但是,如果我将游戏发送给没有C ++ Redistribution 2012的人怎么办?

As the discussion in the comments have shown, you should always build in Release mode for deployment. 如评论中的讨论所示,您应始终以发布模式进行构建以进行部署。 Further more when you link the runtime dynamically you need to either provide the DLLs with your application (copy them from the Visual Studio directory next to your executable) or ship/link the matching redistribution. 此外,当您动态链接运行时时,您需要为DLL提供您的应用程序(从可执行文件旁边的Visual Studio目录中复制它们)或提供/链接匹配的重新分发。

Another option would be to link statically as Schepurin pointed out, but keep in mind that this can cause other issues if not done right and consistently. 如Schepurin所指出的,另一种选择是静态链接,但是请记住,如果操作不正确且始终如一,这可能会导致其他问题。

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

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