中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 搜索 | 上传 | 帮助 »
作者:
标题: djgpp allegro 编译问题 上一主题 | 下一主题
imp
银牌会员




积分 1001
发帖 309
注册 2002-11-19
状态 离线
『楼 主』:  djgpp allegro 编译问题

/* * Example program for the Allegro library, by Shawn Hargreaves. * * This is a very simple program showing how to get into graphics * mode and draw text onto the screen. */ #include "allegro.h" int main() { /* you should always do this at the start of Allegro programs */ if (allegro_init() != 0) return 1; /* set up the keyboard handler */ install_keyboard(); /* set a graphics mode sized 320x200 */ if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) != 0) { if (set_gfx_mode(GFX_SAFE, 320, 200, 0, 0) != 0) { set_gfx_mode(GFX_TEXT, 0, 0, 0, 0); allegro_message("Unable to set any graphic mode\n%s\n", allegro_error); return 1; } } /* set the color palette */ set_palette(desktop_palette); /* clear the screen to white */ clear_to_color(screen, makecol(255, 255, 255)); /* you don't need to do this, but on some platforms (eg. Windows) things * will be drawn more quickly if you always acquire the screen before * trying to draw onto it. */ acquire_screen(); /* write some text to the screen with black letters and transparent background */ textout_centre_ex(screen, font, "Hello, world!", SCREEN_W/2, SCREEN_H/2, makecol(0,0,0), -1); /* you must always release bitmaps before calling any input functions */ release_screen(); /* wait for a keypress */ readkey(); return 0; } END_OF_MAIN(); 这么一个程序 是allegro给的 在98下编译时能顺利通过 而在dos下编译时出现 gcc -o hello.exe exhello.c -lalleg in file include form g:/djgpp/include/allegro/base.h:25, form g:/djgpp/include/allegro.h:25, form exhello.c:9: g:/djgpp/lib/gcc-lib//djgpp/3.1/include/limits.h:11:23: syslimits.h: no such file or director (ENOENT) 是怎么回事呀


2003-12-2 00:00
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
imp
银牌会员




积分 1001
发帖 309
注册 2002-11-19
状态 离线
『第 2 楼』:  

晕 我知道了 是dos不支持长文件名的缘故 我加载了doslfn就可以了 ^_^

[此贴子已经被作者于2003-12-2 20:29:07编辑过]



2003-12-2 00:00
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: