skip to content
 

Free peer-reviewed portable C++ libraries

Availability: 
Instructions for users: 

On Ubuntu this is available by default.


On SuSE load the mdule



 module add boost 


Once it's available you can compile programs using Boost



 g++ myprog.cpp -o myprog 

Licence Details: 

Boost licence which is an open source licence.

Documentation: 

The documentation is in HTML. Type 'module help boost' to find the location for the current boost module on SuSE and then paste that into your browser. On Ubuntu have a look in /usr/share/doc/libboost1.38-doc.

Admin notes: 

This comes as a package in SuSE 11.1 but has a dependency on SuSE's OpenMPI package, which we choose not to install because it hides our richer set of locally built MPIs. We therefore chose to install it on the NFS server. I also chose not to actually build any of it but just to supply headers. Apparently boost can be useful in that state. It has a module which sets CPATH and BOOST_ROOT.


A quick test, taken from the boost documentation:



 #include <boost/lambda/lambda.hpp> #include <iostream> #include <iterator> #include <algorithm>  int main() {     using namespace boost::lambda;     typedef std::istream_iterator<int> in;      std::for_each(         in(std::cin), in(), std::cout << (_1 * 3) << " " ); }  


To test this:



 $ g++ -o boost boost.cpp $ echo 1 2 3 | ./boost 3 6 9 $ 


The test is really whether it finds the headers OK at compile time.


On Ubuntu the packages are more split up and so we can get away with just installing libboost-math-dev and libboost-doc .

Can't find what you're looking for?

Then you might find our A-Z site index useful. Or, you can search the site using the box at the top of the page, or by clicking here.