如何解码boost库命名?

时间:2010-04-26 16:40:13

标签: c++ boost bjam boost-build boost-bjam

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

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

  • mt - 多头,使用bjam threading=multi
  • 获取
  • s - bjam runtime-link=static
  • g - 使用标准和运行时支持库的调试版本。 什么bjam开关???
  • d - 调试bjam variant=debug

更新

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

3 个答案:

答案 0 :(得分:55)

请参阅Boost getting started windows第6.3节命名和section 6.1 on Unix naming

处理-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)

答案 1 :(得分:12)

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

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

-d ABI标记:对影响库与其他已编译代码的互操作性的详细信息进行编码。对于每个此类功能,都会在标记中添加一个字母:

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.

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

答案 2 :(得分:0)

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