【发布时间】:2023-04-10 07:39:01
【问题描述】:
我遇到了麻烦: 我已经在 Ubuntu 上安装了 Allegro5,并编译了我的 Helloworld 项目
#include <allegro5\allegro.h> #include <allegro5\allegro_native_dialog.h> int main(void) {
ALLEGRO_DISPLAY *display=NULL;
if(!al_init()) {
al_show_native_message_box(NULL, NULL, NULL, "failed to initialize allegro!", NULL, NULL);
return -1;
}
display=al_create_display(640,
480);
if(!display) {
al_show_native_message_box(NULL, NULL, NULL, "failed to initialize display!", NULL, NULL);
return -1;
}
al_destroy_display(display);
return 0;
}
使用“ g++ -Wall TestProgram.cc pkg-config --libs allegro-5.0 allegro_font-5.0 allegro_ttf-5.0 ”。
在终端上运行它,它给了我这个错误(或崩溃?)消息:
nac@NAC:~$ ./a.out
nouveau: kernel rejected pushbuf: Bad file descriptor
nouveau: ch0: krec 0 pushes 1 bufs 1 relocs 0
nouveau: ch0: buf 00000000 00000002 00000004 00000004 00000000
nouveau: ch0: psh 00000000 00000004a8 00000004bc
nouveau: 0x00107b00
nouveau: 0x00000000
nouveau: 0x20217000
nouveau: 0x00000003
nouveau: 0x1000f010
经过一些测试,我发现它在“al_destroy_display(display);”上或之后崩溃,事实上,在该错误之后我必须 ctrl+C 才能结束程序。
我该怎么办??
【问题讨论】: