C++ 如何解码 boost 库命名?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2715164/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 00:27:15  来源:igfitidea点击:

How can I decode the boost library naming?

c++boostboost-buildbjam

提问by sorin

I tried to find out that gdmeans in boost library name and I only found two other people looking for the same thing.

我试图找出gdboost 库名称中的意思,但我只发现另外两个人正在寻找相同的东西。

I suppose it should be a place where this is clearly documented and I would like to find it.

我想它应该是一个明确记录的地方,我想找到它。

  • mt- multitheaded, get it with bjam threading=multi
  • s- bjam runtime-link=static
  • g- using debug versions of the standard and runtime support libraries. what bjam switch???
  • d- debug bjam variant=debug
  • mt- 多头,得到它 bjam threading=multi
  • s—— bjam runtime-link=static
  • g- 使用标准和运行时支持库的调试版本。什么bjam开关???
  • d- 调试 bjam variant=debug

Update

更新

How do I control what bjamswitches controls the above variants? In fact the only one that I wasn't able to identify is the g.

如何控制哪些bjam开关控制上述变体?事实上,我唯一无法识别的是g.

回答by user151019

See Boost getting started windowssection 6.3 naming and section 6.1 on Unix naming

请参阅Boost 入门 windows部分 6.3 命名和Unix 命名部分 6.1

The ones that deal with -mt and d are

处理 -mt 和 d 的是

-mt Threading tag: indicates that the library was built with multithreading support enabled. Libraries built without multithreading support can be identified by the absence of `-mt`.  

-d ABI tag: encodes details that affect the library's interoperability with other compiled code. For each such feature, a single letter is added to the tag as listed in this table:
  Key   Use this library when (Boost.Build option)
  s     linking statically to the C++ standard library 
        and compiler runtime support libraries.
        (runtime-link=static)
  g     using debug versions of the standard and runtime support libraries. 
        (runtime-debugging=on)
  y     using a special debug build of Python.
        (python-debugging=on)
  d     building a debug version of your code.
        (variant=debug)
  p     using the STLPort standard library rather than
        the default one supplied with your compiler.
        (stdlib=stlport)

回答by Riot

From the Boost documentation at http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html#library-naming, the convention is:

http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html#library-naming的 Boost 文档中,约定是:

-mtThreading tag: indicates that the library was built with multithreading support enabled. Libraries built without multithreading support can be identified by the absence of -mt.

-mtThreading 标签:表示库是在启用多线程支持的情况下构建的。可以通过缺少 -mt 来识别在没有多线程支持的情况下构建的库。

-dABI tag: encodes details that affect the library's interoperability with other compiled code. For each such feature, a single letter is added to the tag:

-dABI 标记:编码影响库与其他编译代码互操作性的细节。对于每个这样的功能,标签中都会添加一个字母:

Key     Use this library when:
s   linking statically to the C++ standard library and compiler runtime support libraries.
g   using debug versions of the standard and runtime support libraries.
y   using a special debug build of Python.
d   building a debug version of your code.
p   using the STLPort standard library rather than the default one supplied with your compiler.
n   using STLPort's deprecated “native iostreams” feature.

For example, if you build a debug version of your code for use with debug versions of the static runtime library and the STLPort standard library in “native iostreams” mode, the tag would be: -sgdpn. If none of the above apply, the ABI tag is ommitted.

例如,如果您构建代码的调试版本,以在“本地 iostreams”模式下与静态运行时库和 STLPort 标准库的调试版本一起使用,则标记将为:-sgdpn。如果以上都不适用,则省略 ABI 标记。

回答by GrafikRobot

The basic set of built-in features, which is what you specify on the command line (feature=value), are described in the BBv2 documentation (see builtin features). I don't know if we already updated the getting started guide in the upcoming 1.43 release but there is an outstanding documentation change to add those built-in option descriptions to the getting started guide for quicker access.

基本的内置功能集,即您在命令行中指定的内容 (feature=value),在 BBv2 文档中进行了描述(请参阅内置功能)。我不知道我们是否已经在即将发布的 1.43 版本中更新了入门指南,但是有一个出色的文档更改可以将这些内置选项描述添加到入门指南中以便更快地访问。