我m trying to compile source code, but receive: undefined reference to
png_read_info' 文件标题: 的#include “PngImage.hh”未定义的参考`png_read_info '
#include <png.h>
#include <cstdio>
#include <csetjmp>
#include <cstring>
我的编译器设置: -I/usr/include目录/ libxml2的-I在/ usr/include/osmpbf -O0 -g3 -Wall -c -fmessage-length = 0 -lpng
我在做什么错了?
更新: 我真的试图链接: -I/USR /包含/ libxml2的-I/USR /包含/ osmpbf -O0 -g3 -Wall -c -fmessage长度= 0 -L的/ usr /包括/ libpng -lpng
库libpng已经安装。没有什么变化,我再次收到: 未定义的参考topng_read_info
固定。我的错误。我在eclipse中设置编译器设置而不是链接器设置。谢谢大家的回答
你链接到的libpng的? –