1

成功安装 raptor (librdf.org) 后,我运行g++ test.cpp编译。但是得到raptor2.h: No such file or directory

所以我复制/usr/include/raptor2/raptor2.h/usr/include/raptor2.h,上面的错误消失了。但是出现了一个新的错误:undefined reference to `raptor_new_world_internal'.

有人可以告诉我出了什么问题,谢谢.. 环境:ubuntu 12.04。

4

1 回答 1

1

而不是复制你的头文件,尝试

#include <raptor2/raptor2.h>

并用g++ test.cpp -lraptor2. 您需要链接到该库才能使用它。

于 2015-01-21T06:52:01.280 回答