【问题标题】:Boost build a new version with VS 2019Boost 使用 VS 2019 构建新版本
【发布时间】:2021-03-07 06:30:43
【问题描述】:

我从https://www.boost.org/下载了最新版本,当我构建包含mt和工具集的文件时,我需要在VS2019(C++,32位)中构建

我的问题是如何从 lib 和 dll 中删除 mt 和工具集?

【问题讨论】:

    标签: c++ visual-c++ boost


    【解决方案1】:

    Boost 库文件名描述了它们支持的内容以及它们是如何构建的。在您的情况下,它们支持多线程并使用 VS2019 构建(与 MinGw、Clang 或早期版本的 Visual Studio 不同)。欲了解更多信息,请参阅:how can i decode boost library naming

    boost 使用与visual studio 的自动链接,请参阅how boost auto linking makes choice,因此库文件名必须与所需的匹配。

    您还没有说为什么要“从 lib 和 dll 中删除 mt 和工具集”。
    如果要让boost 与现有项目链接,那么您需要使用正确版本的Visual Studio 构建boost,并且不使用多线程,例如:

    b2 toolset=msvc-??? threading=single ...
    

    请参阅:b2 invocation properties

    【讨论】:

    • 我只能删除 boost 版本,因为我们不想在每次更改 boost 版本时都更改包含
    猜你喜欢
    • 2020-04-16
    • 2021-01-15
    • 2015-05-04
    • 2011-07-17
    • 1970-01-01
    • 2015-10-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多