Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I decode the boost library naming?

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

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

Update

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

like image 396
sorin Avatar asked Apr 26 '10 16:04

sorin


People also ask

Is Boost library header-only?

Most Boost libraries are header-only: they consist entirely of header files containing templates and inline functions, and require no separately-compiled library binaries or special treatment when linking. The only Boost libraries that must be built separately are: Boost.

Is Boost library still useful?

You have no guarantee that any Boost library will be continued to be maintained in the future. Standard C++ code written for some compiler today will very likely continue to work fine with a newer compiler by the same vendor 10 years from now, for simple commercial reasons.

What is the use of Boost library in C++?

Boost is a set of libraries for the C++ programming language that provides support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing.

Is Boost library backwards compatible?

Many of the Boost libraries are actively maintained and improved, so backward compatibility with prior version isn't always possible. Deal with this by freezing the version of the Boost libraries used by your project. Only upgrade at points in your project's life cycle where a bit of change will not cause problems.


2 Answers

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)
like image 118
mmmmmm Avatar answered Oct 22 '22 16:10

mmmmmm


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.

like image 23
Riot Avatar answered Oct 22 '22 17:10

Riot