过去,b2 / bjam会建立这样的库:
libboost_wserialization-gcc48-mt-d-1_60.so(注释-gcc48-)
我刚刚从git中克隆了boost,并尝试使用G ++ 8.3.0进行编译, 但它生成的库名为:
libboost_atomic-gcc-mt-d-x64-1_66.so(请注意-gcc-)
我(和CMake)希望它被命名为:
libboost_atomic-gcc83-mt-d-x64-1_66.so (请注意-gcc83-)
要构建,我做到了:
./bootstrap.sh --with-libraries="atomic" --prefix=`pwd`/install
./b2 --layout=versioned link=shared variant=debug threading=multi cflags=-fPIC cxxflags=-fPIC
我尝试使用Google搜索,但未发现任何提示我做错了什么,据我了解--layout = versioned应该导致库名中出现编译器AND版本号...
谢谢
答案 0 :(得分:0)
邮件列表中的答案:
Possibly, it's related to the change in GCC 5+ versioning.
This was accommodated in Boost.Build in October 2018
https://github.com/boostorg/build/pull/349
that is, in Boost 1.69
(boostorg/build should use milestones for issues, IMO)
BTW, there are also CMake's issues in FindCMake.cmake
related to the compiler and architecture tag. So, you may have to
specify Boost_COMPILER and Boost_ARCHITECTURE hints
in order to help FindBoost.cmake recognise versioned names.
https://lists.boost.org/Archives/boost/2019/04/246127.php
提示解决方法: https://cmake.org/pipermail/cmake/2018-October/068459.html https://gitlab.kitware.com/cmake/cmake/issues/17701