我已经使用 MinGW 4.5.2 设置了 Allegro 5.0.4,并且我正在使用带有 Code::Blocks 的 GUN GCC 编译器。
当我尝试编译这个时:
#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;
}
我收到以下构建错误。
构建消息:
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 ===