Boost libraries?

Oct 28, 2010 at 3:31am
I've been reading a lot about C/C++ lately, and I've been noticing a set of libraries called Boost get mentioned a lot lately. Are they all that they seem to be cracked up to be? What are some of the advantages and disadvantages to them? If my users are compiling and installing my program from source, which is common with linux, do they need the libraries installed too? How does it affect the licensing on the programs I release under GNU GPL?

And these are just the start of the questions I have about it. I'm hoping that some of your answers will answer multiple questions, and that the answers are better and more clear than the few I've been able to glean from boost.org.
Oct 28, 2010 at 5:31am
First question is an opinion. I've found the libraries useful for some of my purposes, but some people might not or prefer to write their own for any number of reasons.

The main advantage of the libraries is that you don't have to reinvent the wheel, so to speak. This is how most libraries work. They make things simpler (in general) so you don't have to worry about the details. One disadvantage I can think of is that if, for some reason, you need to tweak the code to fit your purpose, you would need to head in a read and understand a lot of it. If you write the code yourself, this is naturally unnecessary.

If you link dynamically, yes they will need them. If you link statically (basically put them into your executable), then they are stored in the program and won't be needed externally. This obviously makes your program bigger size-wise, however.

The Boost license is rather simple. My understanding is that you are pretty much allowed to do whatever you like with the code, including edit it and use it on free or commercial applications at no cost. It is much less restrictive than something like the GNU GPL.
Oct 28, 2010 at 5:42am
boost is as "general purpose" as libs can get. It doesn't cater to any specific type of program, whereas many other libs focus on gaming (SFML, SDL, etc) or widgetry (wx, Qt, etc)... boost is meant to do things that you might want to do in any program.

Some parts of it are definitely worth having (I'm particularly a big fan of the smart pointers and pointer containers).

It's also worth noting that many parts of the lib are "headers only" meaning they don't need to compile, and they don't require you to link to anything. You just #include whatever header and it's good to go.
Topic archived. No new replies allowed.