C++ Allegro编译错误:未定义对“的引用”;PathFindOnPathA@8&引用;
我已经用MingW4.5.2设置了Allegro5.0.4,我正在使用GUN GCC编译器和Code::Blocks 当我试图编译此文件时:C++ Allegro编译错误:未定义对“的引用”;PathFindOnPathA@8&引用;,c++,compiler-errors,allegro5,C++,Compiler Errors,Allegro5,我已经用MingW4.5.2设置了Allegro5.0.4,我正在使用GUN GCC编译器和Code::Blocks 当我试图编译此文件时: #include <stdio.h> #define ALLEGRO_STATICLINK #include <allegro5/allegro.h> int main(int argc, char **argv){ ALLEGRO_DISPLAY *display = NULL; if(!al_init()
#include <stdio.h>
#define ALLEGRO_STATICLINK
#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;
}
见此:
也就是说:将该库添加到您的链接库列表中。谢谢,我可以发誓我已经按照正确的顺序包含了所有库,我想我错过了一个。我至少检查了5次这个列表。这个依赖关系对5.0.4来说是新的。谢谢,我可以发誓我把所有的库都按正确的顺序包括进去了,我想我错过了一个。我至少检查了5次这个列表。这种依赖关系是5.0.4的新特性。
C:\i\liballegro-5.0.4-static-mt-debug.a(wsystem.o)
In function "al_win_safe_load_library":
d:\Libraries\build\allegro\src\allegro-5.0.x\allegro-5.0.x\src\win\wsystem.c
629 undefined reference to "PathFindOnPathA@8"
=== Build finished: 1 errors, 0 warnings ===