2010-04-26 26 views
43

我试图找出gd意味着在提高库名称,我只找到其他两个人寻找同样的事情。如何解码boost库命名?

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

  • mt - bjam runtime-link=static
  • g - - multitheaded,与bjam threading=multi
  • s得到它使用标准和运行支持库的调试版本。 什么bjam切换???
  • d - 调试bjam variant=debug

更新

我如何控制什么bjam开关控制了上述变种?实际上,我唯一无法确定的是g

+0

你有没有试过谷歌“升压库山民党sgd的含义”。第一个链接“Boost lib链接器错误Visual C++ - 堆栈溢出”给出的指针与Mark的答案相同。 – 2010-04-26 20:04:50

+0

是的,我用'命名'而不是'意义'做了类似的事情,在前20个结果中我什么也没找到。帮助页面很好地解释了它的含义,但它并未指定bjam开关如何改变它们。 – sorin 2010-04-27 08:23:02

回答

47

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) 
+0

谢谢,帮助几乎解决了我的问题,现在它只剩下一个问题:什么bjam开关触发'g'? – sorin 2010-04-27 08:35:30

+1

请参阅5.3.4 - 选项“--build-type = complete”会导致bjam构建库的所有受支持的变体。 – Mark 2010-04-27 09:38:58

+0

谢谢,我知道完整的变体,但想法是尽量减少磁盘空间,并只建立我需要/想要的东西。幸运的是'g'开关在默认情况下是启用的,我获得了我正在寻找的最小版本。不过,我想知道如何禁用它以便为其他人记录此事。 – sorin 2010-04-27 13:54:12

0

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

+0

我很确定在1.43中,这些装饰字母的表格包含相应的Boost.Build功能。 – 2010-05-03 00:53:37

10

从Boost文档在http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html#library-naming,惯例是:

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

例如,如果你建立你的代码的调试版本为使用静态运行时库的调试版本,并在STLPort的标准库“本地iostreams“模式,标签将是:-sgdpn。如果以上都不适用,则省略ABI标签。