tags:

views:

167

answers:

1

Is the C++ Boost library usually included by default on most Linux distros?

+16  A: 

Many distributions include boost in their official repositories, but do not provide it by default on a standard install (in other words, it's not installed by default, but is relatively easy to install).

On the other hand, presuming you're asking this because you're wondering if you can use boost in a project that you want to work on many distributions: most of boost's libraries are header only because they're templates, which means they get compiled into your project and it doesn't matter whether or not a distribution has them installed (same effect as statically linking).

For those parts of boost that aren't header only, you can statically link and still make a binary that will run on distros that don't come with boost.

Joseph Garvin
You are reading my mind!
jldupont
+1 on the distinction of templates vs. libraries
Javier
You can also link in static libraries, if you're using one of the libraries that isn't header only, you can always make a distributable binary.The trick is if you want the user to be able to build it themselves, then they need the headers (and libraries if necessary), but if they're building stuff themselves, its probably not too much to ask.
teeks99