How can I decode the boost library naming?

巧了我就是萌 提交于 2019-11-26 18:38:44

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

The ones that deal with -mt and d are

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

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

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

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!