我正在查看jam文件,如何构建库的名称。
示例:libboost_log-mgw46-mt-1_48.dll
我想忽略最后一部分,如何使用我的构造名称传递链接-o参数。 我有几个版本,并且在一个大项目中链接迫使我在项目文件中进行更改,这是很多地方。
我的愿望是获取libboost_log.dll。我只是重命名,但在执行程序时它说,它无法找到
libboost_log-mgw46-mt-1_48.dll
档案。
答案 0 :(得分: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.
system
布局提供了您想要的命名方案 - 普通基本名称,没有任何其他信息。
根据这些布局的Boost输出文件的名称是使用tag
文件中定义的boostcpp.jam
规则生成的。