您的位置:首页 > 编程语言 > C语言/C++

在VC++6.0中安装Allegro游戏图形库

2016-05-06 00:40 483 查看
Allegro是一个c/c++的游戏库.

在VC++6.0环境下配置环境变量使用Allegro游戏图形库:

下载Allegro库

http://pan.baidu.com/s/1bpc8Ymz

(allegro-msvc6-4.2.3.zip为VC++6.0专用)

复制 C:\allegro\include 里面的文件到 C:\Microsoft Visual Studio\VC98\Include

复制 C:\allegro\lib 里面的文件到 C:\Microsoft Visual Studio\VC98\lib

复制 C:\allegro\bin 里面的文件到 C:\Windows\SysWOW64(如果是32位就是C:\Windows\System32)

新建一个win32 Application工程,添加一个C++ Source File

工程设置:静态库的链接



project->setting(Win32 Debug)->Link->Object/library modules:末尾添加alld.lib

Win32 Release



project->setting(Win32 Release)->Link->Object/library modules:末尾添加alleg.lib

选择OK! 复制下面的测试代码,运行试一试!

测试代码:

#include <allegro.h>

int main(void)
{
allegro_init();
allegro_message("Welcome to Allegro!");

return 0;
}
END_OF_MAIN()


可参考原文:

https://wiki.allegro.cc/index.php?title=Allegro_4_Tutorial#Using_Microsoft_Visual_C.2B.2B_with_Allegro
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: