使用Boost库时出错

Errors in using Boost library

本文关键字:出错 Boost 使用      更新时间:2023-10-16

//上次错误消失时编辑

我已经将ppclinux库替换为特定的库。新错误显示为-

libboost_thread-gcc44-mt-1_49.a(thread.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
../../ThirdPartyLibs/boost/stage/lib/libboost_thread-gcc44-mt-1_49.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libAFE.so] Error 1

有什么解决方案吗?

解决了它。

问题是这些库是用64位构建的。配置bjam命令解决了这个问题。命令如下-

bjam toolset=gcc address-model=64 architecture=x86 variant=release link=static,shared --layout=versioned --build-type=complete