【发布时间】:2018-08-14 18:19:18
【问题描述】:
我正在尝试使用这些标志编译我的代码:
g++ load.cpp -o load -I/usr/local/include/allegro5 -Wall -L/usr/local/lib -lallegro `pkg-config --libs allegro-5 allegro_audio-5 allegro_dialog-5 allegro_image-5 allegro_memfile-5 allegro_primitives-5 allegro_acodec-5 allegro_color-5 allegro_font-5 allegro_main-5 allegro_physfs-5 allegro_ttf-5`
我收到此错误:
load.cpp:3:10: fatal error: allegro5/allegro_native_dialog.h: No such file or directory
# include <allegro5/allegro_native_dialog.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
我研究并发现了这些问题:Allegro 5 No such file or directory、Allegro native dialogues not recognized ...但没有任何作用。
Ps : 我安装了所有依赖并更新了整个系统。
我该如何解决它,有没有办法安装这个库或将路径传递给 g++ ?
【问题讨论】:
-
你真的能在你的硬盘上找到文件
allegro_native_dialog.h/usr/local/include/allegro5/allegro5/吗?如果不是,请检查以下目录/usr/local/include/allegro5/。如果可行,您可以将 g++ 的包含路径设置为-I/usr/local/include/。 -
你都没有提到。我使用 Ubuntu 17.10 Budgie。
-
您是如何安装 Allegro 的?如果您可以发现 Allegro 头文件,则必须将此路径作为 -I 参数传递给 g++