为什么我得到这个简单的C ++代码的过程入口点错误? [英] Why am I getting a procedure entry point error for this simple C++ code?
问题描述
我在写一个SFML游戏,当我试图运行代码这是我得到的错误:
点
_gxx_personality_v0
无法位于动态链接库libstdc ++ - 6.dll
我已正确链接到所有库,包含文件正确。我甚至尝试了其他的答案建议放置 libstdc ++ - 6.dll
在我的可执行目录,但仍然没有。
另一个回答说,将 MinGW / bin
目录放在 PATH
环境变量中的任何其他目录之前,我也做了,它仍然没有工作。
注意:我得到这个错误,只有当我尝试使用SFML代码。
$ p确定,你添加的注释告诉我,SFML的东西是编译的另一个
您需要确保 SFML
和您的代码由相同的编译器(版本/配置)或至少兼容的编译器(版本/配置)编译。
我看到SFML的最新二进制包使用GCC 4.7,和最新的Code :: Blocks(mingw)自带的TDM GCC 4.7版本,所以它可能已经足够升级Code :: Blocks,并确保您使用SFML GCC 4.7 TDM(SJLJ)包(并使用gcc
否则,你应该手动安装TDM-GCC 4.7编译器,或者如果没有效果,自己编译SFML。 / p>
I'm writing an SFML game and when I try to run the code this is the error I get:
The procedure entry point
_gxx_personality_v0
could not be located in the dynamic link librarylibstdc++-6.dll
I've linked to all the libraries correctly and the include files are correct. I've even tried what other answers suggested by putting the libstdc++-6.dll
inside the directory of my exectable but still nothing.
Another answer said to put the MinGW/bin
directory before any other directory in the PATH
environment variable, which I did as well and it still didn't work.
Note: I get this error only when I try to use SFML code. It runs successfully when I comment it out.
OK, the note you added tells me that the SFML stuff was compiled with another compiler version/configuration, newer one if memory serves right.
You need to make sure that SFML
and your code are compiled by the same compiler (versions/configuration) or at least compatible compiler (versions/configuration).
I see that the latest binary packages of SFML use GCC 4.7, and the latest Code::Blocks (mingw) comes with the TDM GCC 4.7 build, so it might be enough to upgrade Code::Blocks and make sure you use the SFML GCC 4.7 TDM (SJLJ) package (and use the gcc that comes with Code::Blocks, of course).
Otherwise, you should probably install the TDM-GCC 4.7 compiler build manually, or if nothing works, compile SFML yourself.
这篇关于为什么我得到这个简单的C ++代码的过程入口点错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!