Allegro SCAN_DEPEND 问题
我正在尝试使用 allegro-msvc80-4.2.2 预构建包构建一个项目。我使用的是 Visual C++ Express Edition 2005,并添加了输入库 alld.lib,并按照以下说明包含 allegro.h asp:
http://wiki.allegro.cc/index.php?title=Visual_C%2B%2B_Express_2005
当我编译时,出现致命错误:
C1083:无法打开包含文件: “pc.h”:没有这样的文件或目录
这是因为如果 SCAN_DEPEND 未定义,则 allegro 平台头文件“aldjgpp.h”会尝试包含不存在的文件(以及其他文件,例如 dpmi.h 和 unistd.h)。
如果我尝试定义 SCAN_DEPEND,我会从 alconfig.h 收到错误消息“平台不支持”。
I am trying to build a project with the allegro-msvc80-4.2.2 pre-built package. I'm using Visual C++ Express Edition 2005 and have added the input library alld.lib and am including allegro.h asp per these instructions:
http://wiki.allegro.cc/index.php?title=Visual_C%2B%2B_Express_2005
When I compile, I get the fatal error:
C1083: Cannot open include file:
'pc.h': No such file or directory
This is because the allegro platform header file "aldjgpp.h" tries to include the nonexistent file (as well as others such as dpmi.h and unistd.h) if SCAN_DEPEND is undefined.
If I try defining SCAN_DEPEND, I get an error from alconfig.h saying "platform not supported."
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该错误表明您没有使用正确的头文件。预构建文件附带的头文件已适当设置。
您应该有一个
include/allegro/platform/alplatf.h
文件。对于 MSVC,应该有一行:最佳解决方案是从计算机中删除 Allegro 源的所有实例,然后重新下载文件。请务必检查编译器的目录中是否有杂散标头。从 cmd.exe 提示符运行以下命令将帮助您查找任何文件。
dir /sc:\allegro.h
如果继续使用旧的头文件,可能会遇到其他问题。
另外,您可能需要考虑使用 Allegro 4.2.3,因为它是 4.2 系列的最新版本。 (可在 http://www.allegro.cc/files/ 获取。)
That error indicates that you are not using the proper header files. The header files that come with the pre-built files are set appropriately.
You should have an
include/allegro/platform/alplatf.h
file. For MSVC that should have one line:The best solution is to delete all instance of Allegro source from your computer, and redownload the file. Be sure to check your compiler's directories for stray headers. The following command, as run from the cmd.exe prompt, will help you find any files.
dir /s c:\allegro.h
If you continue to use the old header files, you may run across other problems.
Also, you may want to consider using Allegro 4.2.3, as it is the latest version of the 4.2 series. (Available at http://www.allegro.cc/files/.)