提升:bjam如何构建库名?

San*_*Grm 23 linker boost compilation bjam

我正在查看jam文件,如何构建库的名称.例:libboost_log-mgw46-mt-1_48.dll

我想忽略最后一部分,如何使用我的构造名称传递链接-o参数.我有几个版本,并且在一个大项目中链接迫使我在项目文件中进行更改,这是很多地方.

我的愿望是获取libboost_log.dll.我只是重命名,但在执行程序时说,它无法找到 libboost_log-mgw46-mt-1_48.dll文件.

Raf*_*cki 30

Boost Bjam 定义了3种不同的命名布局.引用Jamroot文件中的帮助(我不知道任何更好的在线文档):

#   --layout=<layout>       Determines whether to choose library names
#                           and header locations such that multiple
#                           versions of Boost or multiple compilers can
#                           be used on the same system.
#
#                               versioned - Names of boost binaries
#                               include the Boost version number, name and
#                               version of the compiler and encoded build
#                               properties.  Boost headers are installed in a
#                               subdirectory of <HDRDIR> whose name contains
#                               the Boost version number.
#
#                               tagged -- Names of boost binaries include the
#                               encoded build properties such as variant and
#                               threading, but do not including compiler name
#                               and version, or Boost version. This option is
#                               useful if you build several variants of Boost,
#                               using the same compiler.
#
#                               system - Binaries names do not include the
#                               Boost version number or the name and version
#                               number of the compiler.  Boost headers are
#                               installed directly into <HDRDIR>.  This option
#                               is intended for system integrators who are
#                               building distribution packages.
#
#                           The default value is 'versioned' on Windows, and
#                           'system' on Unix.
Run Code Online (Sandbox Code Playgroud)

system布局给你想要的命名方案 -没有任何其他信息基本名称平原.

根据这些布局的Boost输出文件的名称是使用tagboostcpp.jam文件中定义的规则生成的.

  • 让我感到困扰的是,在SO上找到它比在boost文档中找到更容易. (11认同)