无法找到程序入口点?
由于某些奇怪的原因,当我尝试在 SFML 中渲染一个简单的窗口时,在使用 Visual C++ 2010 时出现一个奇怪的错误: The procedure entry point ??()VideoMode@sf@@QAE@III@Z can not be位于动态链接库 sfml-window.dll
使用 Code::Blocks 时,我完全没有收到任何错误。但问题似乎是一样的。
然而,问题是我仍然没有看到 SFML 应用程序窗口,或者我喜欢称之为“固定”的窗口。
我的问题是什么?
For some odd reason when I try to render a simple window in SFML, I get a strange error when using Visual C++ 2010: The procedure entry point ??()VideoMode@sf@@QAE@III@Z could not be located in the dynamic link library sfml-window.dll
When using Code::Blocks I get no error at all. But the problem seems to be the same.
However the point is I still get no SFML application window, or a "fixed" window as I like to call it.
What's my problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我刚刚发现我必须静态链接库。
不过还是谢谢你的回答。
I just found out that I had to statically link the libraries.
Thank for your answers though.
问题是正在加载的 DLL 与您链接的 lib 文件不匹配。
我通过在与可执行项目相同的编译器和设置下重新编译 DLL 解决了类似的问题
The problem is that the DLLs that are being loaded, do not match the lib files that you are linking with.
I have resolved similar problems by recompiling the DLL's under the same compiler and settings as the executable project
您没有链接所有库。 Code::Blocks 自动链接所有这些,但不是 VS。当我使用 OpenGL 创建应用程序时,我这样做(通过代码链接,看起来不太漂亮,但“正常工作”):
You're not linking all the libraries. Code::Blocks link all of 'em automatically, but not VS. When i create applications using OpenGL, i do this (linking via code, doesn't looks pretty, but "just works"):