我遵循了以下指南:http://wiki.allegro.cc/index.php?title=Debian_and_Allegro_5一切顺利,我在/usr/lib中有/usr/include/allegro5和allegro库文件
当我编译简单的程序时,includes被正确地解析,但我在链接方面有问题。
pkg-config --libs allegro-5.0返回"-lallegro“。
当我将-lallegro (或pkg-config --libs allegro-50)放入makefile中时,我收到消息“无法找到-lallegro”
生成文件: g++ -static -O2 $(INCLUDES) $(SRC) -otest -D USE_THREADS -lboost_thread -lpthread -L/usr/lib/ pkg-config --libs --cflags allegro-5.0
发布于 2012-04-07 02:52:31
如果pkg-config --libs allegro-5.0返回-lallegro,并且库存在于/usr/lib中,那么您可能只需要运行sudo ldconfig。
https://stackoverflow.com/questions/10041925
复制相似问题