[英]compiler error with windows 8 sfml and codeblocks
Trying to pick up a 2D library, SFML was my choice. 试图选择一个2D库,SFML是我的选择。
But, I can't get it to link properly. 但是,我不能让它正确链接。
When I try to build and run it I get the following error: the procedure entry point gxx personality v0 could not be located in the dynamic link library sfml-graphics-d-2.dll
当我尝试构建并运行它时,我收到以下错误:程序入口点gxx personality v0无法位于动态链接库
sfml-graphics-d-2.dll
btw IDE is Code::Blocks 12.11 and compiler is MinGW(default) 顺便说一句IDE是Code :: Blocks 12.11,编译器是MinGW(默认)
I've extracted the library to c:\\SFML-2.0
我已将库提取到
c:\\SFML-2.0
I've set the compiler search directories for compiler to C:\\SFML-2.0\\include
and Linker: C:\\SFML-2.0\\lib
我已将编译器的编译器搜索目录设置为
C:\\SFML-2.0\\include
和Linker: C:\\SFML-2.0\\lib
And in the project that I've started I've added in the linker settings-> link libraries: 在我开始的项目中,我已经在链接器设置 - >链接库中添加了:
Debug:
sfml-graphics-d
sfml-window-d
sfml-system-d
Release:
sfml-graphics
sfml-window
sfml-system
I've also copied the dll files from C:\\sfml-2.0\\bin
to the location of the project. 我还将dll文件从
C:\\sfml-2.0\\bin
复制到项目的位置。
I've tried using the static linking without success. 我尝试过使用静态链接但没有成功。 watched some sfml tutorials and followed them, googled but nothing seems to work for me.
观看了一些sfml教程并跟着他们,谷歌搜索但似乎没有什么对我有用。 Also reinstalled code::blocks.
还重新安装了代码:: blocks。
Ideas? 想法?
You need to use the correct SFML package. 您需要使用正确的SFML包。 Errors with
gxx_personality_v0
usually indicate a runtime library mismatch. gxx_personality_v0
错误通常表示运行时库不匹配。 If you're really using Code::Blocks 12.11 with the compiler they ship with, then you'll have the TDM 4.7.1 compiler, which uses the SJLJ exception model. 如果你真的使用Code :: Blocks 12.11和它们附带的编译器,那么你将拥有TDM 4.7.1编译器,它使用SJLJ异常模型。 Thus the matching compiler from the SFML download page would be
GCC 4.7 TDM (SJLJ) - 32 bits
. 因此,SFML 下载页面中的匹配编译器将是
GCC 4.7 TDM (SJLJ) - 32 bits
。
Keep in mind that there's a newer Code::Blocks version (13.12), which uses a newer version of TDM, but for which SFML doesn't provide binaries/pre-compiled packages, thus you'd have to build SFML yourself. 请记住,有一个较新的Code :: Blocks版本(13.12),它使用较新版本的TDM,但SFML不提供二进制文件/预编译包,因此您必须自己构建SFML。 While the TDM compiler is easy to install, I wouldn't recommend it, since it breaks the standard way of using GCC-like compilers.
虽然TDM编译器易于安装,但我不推荐它,因为它打破了使用类似GCC的编译器的标准方法。 Instead you might want to look at Stephan T. Lavavej's build over at nuwen.net or go with MinGW Builds - for each you'll have to recompile SFML.
相反,你可能想看看斯蒂芬T. Lavavej的构建了在nuwen.net或去MinGW的构建 -每个你必须重新编译SFML。
If you still get the error, I fixed mine by: 如果你仍然得到错误,我通过以下方式修复了我:
In the Compiler settings dialog: In the left-hand menu, verify Global compiler settings is selected, Select the Toolchain executables tab, Select the Additional Paths tab, and Press the Add button, find the bin folder of SFML (C:\\CodeBlocks\\sfml\\bin), and add it without keeping relative paths. 在“编译器设置”对话框中:在左侧菜单中,选中“全局编译器设置”,选择“工具链可执行文件”选项卡,选择“其他路径”选项卡,然后按“添加”按钮,找到SFML的bin文件夹(C:\\ CodeBlocks \\ sfml \\ bin),并在不保留相对路径的情况下添加它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.