C++ SDL2.DLL 丢失
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18389874/
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
SDL2.DLL missing
提问by Simon Kay
I'm following this tutorialto setup the SDL template but when I try and run the program I get the followingerror.
我正在按照本教程设置 SDL 模板,但是当我尝试运行该程序时,出现以下错误。
I have gone over the tutorial several times but cannot see what mistake I am making.
我已经多次阅读教程,但看不出我犯了什么错误。
I copied the SDL2.DLL into the Release Directory and then ran it and I got a differenterror.
我将 SDL2.DLL 复制到发布目录中,然后运行它,但出现了不同的错误。
but I imagine that I shouldn't have to do this?
但我想我不应该这样做?
Anyone see what mistake I could be making?
有人看到我可能犯了什么错误吗?
I am using windows 8 + MS Visual Studio 2012
我使用的是 Windows 8 + MS Visual Studio 2012
回答by Gigi
There are two different versions of SDL2.DLL, one is x86 and another is x64. A common mistake is to use the x64 one when in fact you are compiling your code as x86. Try both of them to make sure you aren't making that mistake.
SDL2.DLL 有两种不同的版本,一种是 x86,另一种是 x64。一个常见的错误是在实际上将代码编译为 x86 时使用 x64。尝试两者以确保您不会犯那个错误。