Boost:bjam 如何构建库名称?

发布于 2024-12-28 07:26:18 字数 264 浏览 5 评论 0原文

我在查看 jam 文件,了解库的名称是如何构造的。 示例:libboost_log-mgw46-mt-1_48.dll

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

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

I was looking in the jam files, how the name of library is constructed.
Example: libboost_log-mgw46-mt-1_48.dll

I would like to ignore the last part, how to pass linker the -o parameter with my constructed name.
I have few versions and linking in a big project forces me to do changes in project file and that is a lot of places.

My wish is to get libboost_log.dll. I did just rename, but when executing a program it says, that it can not find
libboost_log-mgw46-mt-1_48.dll file.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

左秋 2025-01-04 07:26:18

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 文件中定义。

Boost Bjam has 3 different layouts of naming defined. To quote the help placed in Jamroot file (I'm not aware of any better online documentation):

#   --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.

The system layout gives the naming scheme you want - plain basename without any other information.

Names for Boost output files according to these layouts are generated using the tag rule, defined in boostcpp.jam file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文