我下载并使用vcpkg构建了mapnik库,之后我尝试将mapnik添加到eclipse中。对于GCC C++编译器,包括:/home/ubuntu/vcpkg/packages/mapnik_x64-linux/include"对于GCC C++连接体:"/home/ubuntu/vcpkg/packages/mapnik_x64-linux/lib";添加。当ı试图建立它给了我这些:
"Description Resource Path Location Type
recipe for target 'src/hello.o' failed subdir.mk /hello/Debug/src line 18 C/C++ Problem,
Description Resource Path Location Type
make: *** [src/hello.o] Error 1 hello C/C++ Problem,
Description Resource Path Location Type
recipe for target 'hello' failed makefile /hello/Debug line 58 C/C++ Problem,
Description Resource Path Location Type
fatal error: boost/operators.hpp: there is no such a file or directory hello line 33, external location: /home/ubuntuc/vcpkg/packages/mapnik_x64-linux/include/mapnik/color.hpp C/C++ Problem.
我是不是加错了库,或者库的构建有问题。
正如@zkoza所说,mapnik需要提升。如果您使用vcpkg安装了mapnik,您还需要添加所有的mapnik依赖项。由于这是相当多的,我建议使用pkgconfig或cmake来管理它们。