C:\DevCpp\dev-c++bear\2 unable to run program file. 连以前编译成功的东西都不能编译了......唉,真是困难重重啊,伤心ing
简单的快乐着~
[此贴子已经被作者于2007-8-20 20:56:12编辑过]
为什么这个例子不用工程还是不能编译通过呢?
#include <allegro.h>
int main()
{
int white;
allegro_init(); /*Allegro 初始化*/
install_keyboard(); /*安装键盘处理例程*/
set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0); /*设置图形模式*/
set_color_depth(16); /*设置色深*/
white = makecol(255, 255, 255); /*计算白色值*/
putpixel(screen, 320, 200, white); /*在屏幕坐标(320,200)处用白色画点*/
putpixel(screen, 321, 200, white);
putpixel(screen, 320, 201, white);
putpixel(screen, 321, 201, white);
putpixel(screen, 322, 200, white);
readkey(); /*暂停一下,观看结果*/
return 0;
}
END_OF_MAIN();
结果:
C:\DOCUME~1\高策.BEAR\LOCALS~1\Temp\ccO6baaa.o(.text+0x27) In function `mangled_main':
[Linker error] undefined reference to `_install_allegro_version_check'
[Linker error] undefined reference to `install_keyboard'
[Linker error] undefined reference to `set_gfx_mode'
[Linker error] undefined reference to `set_color_depth'
......等等