26

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

我想忽略最后一部分,如何将 -o 参数与我构造的名称一起传递给链接器。我的版本很少,在一个大项目中的链接迫使我对项目文件进行更改,这是很多地方。

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

4

1 回答 1

34

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.

system布局提供了您想要的命名方案-没有任何其他信息的普通基本名称。

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

于 2012-03-03T22:53:12.417 回答