Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

boost lib build configuration variations

Tags:

c++

linker

boost

I am new to boost - can you please tell me what are the difference b/w the following variations of the boost lib and which one do I need to link to in which case?

  • libboost_unit_test_framework-vc80-1_35.lib
  • libboost_unit_test_framework-vc80-gd-1_35.lib
  • libboost_unit_test_framework-vc80-mt-1_35.lib
  • libboost_unit_test_framework-vc80-mt-gd-1_35.lib
  • libboost_unit_test_framework-vc80-mt-s-1_35.lib
  • libboost_unit_test_framework-vc80-mt-sgd-1_35.lib
  • libboost_unit_test_framework-vc80-s-1_35.lib
  • libboost_unit_test_framework-vc80-sgd-1_35.lib

Well, what I actually after is to understand the whole taxonomy of the _gd, mt, sgd things.

like image 517
Steve Avatar asked Oct 29 '09 22:10

Steve


People also ask

Is Boost better than STL?

But STL can be learned in isolation, whereas boost won't make much sense until you understand the STL, since that's what Boost is modeled on, and designed to extend. So learn to use the STL as part of learning c++. And then you can move on to Boost, which is more or less the "second standard library" these days.

Can I build Boost with Cmake?

One of my current projects relies on Boost. Python, which requires a more recent version of Boost (1.64) than the one (1.54) provided by my Linux distribution (Ubuntu 14.04).

What is Boost library C++ 11?

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. It contains 164 individual libraries (as of version 1.76). Boost.


2 Answers

[lib][boost_unit_test_framework]-[vc80]-[mt]-[sgd]-[1_35][.lib]
  • lib: On Linux all files are prefixed with this
    • On Windows this prefix is not on "import libraries and DLLs"
  • boost_unit_test_framework: The library name beginning with boost_
  • vc80: Toolset and version used to build this library
    • vc71: Microsoft Visual C++ 2003 (version 7.1)
    • vc80: Microsoft Visual C++ 2005 (version 8.0)
    • mgw53: MinGW 5.3
  • mt: Indicates multithreading support
  • sgd: Each letter indicates something
    • s: Static linking
    • g: Linked to debug libraries
    • y: "using a special debug build of Python"
    • d: Boost debug
    • p: Uses "the STLPort standard library"
    • n: using STLPort's deprecated "native iostreams" feature
  • 1_35: Boost version
  • .lib: Extension varies based on convention in operating system

Based on this (Thanks @n1ckp)

Also take a look at the list of Boost 1.34.0 binaries available for download for some examples.

like image 142
Nate Avatar answered Oct 19 '22 21:10

Nate


Here is the link to the docs for full info on what the many suffixes means:

windows: http://www.boost.org/doc/libs/1_40_0/more/getting_started/windows.html#library-naming

linux: http://www.boost.org/doc/libs/1_40_0/more/getting_started/unix-variants.html#library-naming

Although it seems it's the same anyway so either link should be good.

like image 23
n1ckp Avatar answered Oct 19 '22 20:10

n1ckp