gpt4 book ai didi

c++ - Boost bjam 不会将编译器版本放在文件名中

转载 作者:太空宇宙 更新时间:2023-11-04 12:37:12 27 4
gpt4 key购买 nike

过去,b2/bjam 会构建这样命名的库:

libboost_wserialization-gcc48-mt-d-1_60.so (note -gcc48-)

我刚刚从 git 中克隆了 boost,并尝试使用 G++ 8.3.0 进行编译,但它生成的库名为:

libboost_atomic-gcc-mt-d-x64-1_66.so (note the -gcc-)

我(和 CMake)期待它被命名为:

libboost_atomic-gcc83-mt-d-x64-1_66.so (note the -gcc83-)

为了构建,我做了:

./bootstrap.sh --with-libraries="atomic" --prefix=`pwd`/install
./b2 --layout=versioned link=shared variant=debug threading=multi cflags=-fPIC cxxflags=-fPIC

我尝试使用谷歌搜索,但没有发现任何提示我做错了什么,我的理解是 --layout=versioned 应该在库名称中产生编译器和版本号......

谢谢

最佳答案

邮件列表的回答:

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

关于c++ - Boost bjam 不会将编译器版本放在文件名中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55917883/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com