【问题标题】:BJam not compiling boost libraries with '-mt' tag when multi threading specified指定多线程时,BJam 未使用“-mt”标签编译 boost 库
【发布时间】:2013-12-16 18:07:06
【问题描述】:

我正在尝试为 osx 编译 boost v1.55 库,支持多线程。我的 user-config.jam 对编译器的配置如下:

using clang : osx
: xcrun clang -arch i386 -arch x86_64 -stdlib=libstdc++ -mmacosx-version-min=10.9
;

我运行构建库的命令如下:

./b2 -a -j8 toolset=clang-osx link=static threading=multi --with-thread

但是,生成的库格式如下:libboost_.a,而不是 libboost_-mt.a

有人知道为什么'-mt'标签被省略了吗?

【问题讨论】:

    标签: boost bjam b2


    【解决方案1】:

    为了启用我请求的格式(在库名称中添加标签以指示编译库的配置),需要在构建选项中设置适当的 layout 参数.我的构建命令应该是这样的:

    ./b2 -a -j8 toolset=clang-osx link=static threading=multi --layout=tagged --with-thread
    

    【讨论】:

      猜你喜欢
      • 2013-12-04
      • 2016-06-14
      • 2011-06-06
      • 1970-01-01
      • 1970-01-01
      • 2013-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多