Boost:bjam 如何构造库名?

标签 boost compilation linker bjam

我正在查看果酱文件,库的名称是如何构造的。
示例: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/

相关文章:

C++线程数据库类内存混合

python - 为每个操作系统卡住一个 python 脚本

c - struct_ 前缀与无前缀

c++ - 在 MSVC++ 2012 下使用 C++Amp 将程序与库链接时未解析的符号

gcc - 如何让链接器和加载器在特定路径选择共享库?

c++ - 让 Visual Studio 2008 使用 8.0 CRT 库?

c++ - boost ASIO async_write "Vector iterator not dereferencable"

c++ - 在 scoped_ptr 出现异常时不调用析构函数

c++ - c++中唯一标识任意对象

c - 我无法编译 vortex1.c 文件,当我尝试获取 .exe 文件时,它还会返回 .o 文件