在动态链接库libstdc ++-6.dll中找不到过程入口点_gxx_personality_v0错误 [英] The procedure entry point _gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll Error
问题描述
昨天,我决定下载,安装并尝试使用Allegro5.我还下载了带有MinGW编译器的Code :: Blocks 12.11.我设置了一切并正确安装了一切(或者我认为),然后尝试运行示例代码以查看其是否有效:
Yesterday I decided to download, install, and attempt to use Allegro 5. I also downloaded Code::Blocks 12.11 w/ the MinGW compiler. I set up everything and installed everything correctly (or so I thought) and tried to run a sample code to see if it would work:
#include <stdio.h>
#include <allegro5/allegro.h>
int main(int argc, char **argv){
ALLEGRO_DISPLAY *display = NULL;
if(!al_init()) {
fprintf(stderr, "failed to initialize allegro!\n");
return -1;
}
display = al_create_display(640, 480);
if(!display) {
fprintf(stderr, "failed to create display!\n");
return -1;
}
al_clear_to_color(al_map_rgb(0,0,0));
al_flip_display();
al_rest(10.0);
al_destroy_display(display);
return 0;
}
当我尝试编译并运行程序时,出现错误消息框,提示过程入口点_gxx_personality_v0不能位于动态链接库libstdc ++-6.dll中."我在网上搜索了大约一个小时,试图找到解决此问题的方法,就像我在大多数情况下所做的那样,但是我空手而归.我想知道是否有人对解决此问题有任何想法,如果有,请尽快告诉我!预先感谢!
When I attempt to compile and run the program an error message box appears saying "The procedure entry point _gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll." I searched the web for about an hour trying to find a fix for this problem, like I do for most things, but I came up empty handed. I'm wondering if anyone has any ideas for any fixes to this problem, if so, let me know ASAP! Thanks in advance!
推荐答案
__gxx_personality_v0
用于C ++库的异常处理. MinGW可以在x86上支持几个不同的异常模型:sjlj(setjmp
/longjmp
)或DWARF(DW2).据我所知,将使用哪种模型被编译到编译器中-不能通过命令行选项进行选择.
__gxx_personality_v0
is used in the exception handling of the C++ library. MinGW can support a couple different exception models on the x86: sjlj (setjmp
/longjmp
) or DWARF (DW2). As far as I know, which model will be used is compiled into the compiler - it's not something that can be selected with a command line option.
sjlj异常模型将链接到__gxx_personality_sj0
,DW2异常模型将链接到__gxx_personality_v0
.似乎您的编译器正在为dw2异常模型构建,但是在运行时,它会找到使用sjlj模型构建的libstdc++-6.dll
.查看您的系统上是否具有libstdc++-6.dll
的多个版本,并查看是否将另一个版本复制到与您的程序相同的目录下可以解决此问题.
The sjlj exception model will link to __gxx_personality_sj0
, the DW2 exception model links to __gxx_personality_v0
. It seems like your compiler is building for the dw2 exception model, but at runtime it's finding a libstdc++-6.dll
that was built with the sjlj model. See if you have multiple versions of libstdc++-6.dll
on youR system, and see if copying another one to the same directory as your program fixes the problem.
您可以使用nm libstdc++-6.dll | grep personality
来查看DLL正在使用哪个异常个性".
You can use nm libstdc++-6.dll | grep personality
to see which exception 'personality' the DLL is using.
这篇关于在动态链接库libstdc ++-6.dll中找不到过程入口点_gxx_personality_v0错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!