【发布时间】:2010-11-29 23:22:23
【问题描述】:
我刚刚下载了 allegro 库
我新建一个空项目,然后添加一个源文件
我添加这行代码:
#include <allegro.h>
我编译并得到以下错误:
c:\allegro\include\allegro5\internal\alconfig.h(28) : 致命错误 C1083: 无法打开包含文件: 'allegro5/platform/alplatf.h': 没有这样的文件或目录
所以我进入 alconfig.h 并更改:
#include "allegro5/platform/alplatf.h"
到:
#include "../../allegro5/platform/alplatf.h.cmake"
现在给了我这个错误:
c:\allegro\include\allegro5\platform\alplatf.h.cmake(2) : 致命错误 C1021: invalid preprocessor command 'cmakedefine'
所以我摆脱了#include "../../allegro5/platform/alplatf.h.cmake" 声明然后说:
c:\allegro\include\allegro5\internal\alconfig.h(57) : 致命错误 C1189: #error : 不支持平台
我不知道从那里去,我正在运行 Windows,所以我真的很难过
【问题讨论】:
-
一般挖掘源码并不是编译库的方法。该库(希望)为作者编译,因此您只需设置正确的路径和类似设置即可使其为您编译。您是否阅读过构建 allegro 的文档?
标签: visual-c++ compiler-errors allegro visual-c++-2008-express