gpt4 book ai didi

Boost:bjam 如何构造库名?

转载 作者:行者123 更新时间:2023-12-03 10:59:13 28 4
gpt4 key购买 nike

我正在查看果酱文件,库的名称是如何构造的。
示例:libboost_log-mgw46-mt-1_48.dll
我想忽略最后一部分,如何使用我构造的名称将 -o 参数传递给链接器。
我的版本很少,并且在一个大项目中链接迫使我在项目文件中进行更改,这是很多地方。

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

最佳答案

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 layout 给出了你想要的命名方案 - 没有任何其他信息的简单基名。

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

关于Boost:bjam 如何构造库名?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8940249/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com