Software Category


Boost is a very large, multipurpose, and powerful library of algorithms and tools written for C++. The package contains several sub-libraries including networking tools, basic linear algebra codes, several general-purpose algorithms, data structures, parallelization tools, and more.

Using Boost on RCC Resources

There are a large number of sub-libraries that are part of Boost. First you will need to determine which ones your program will need to link to. This can be done by finding the correct name in /opt/hpc/gnu/lib64. Use the command:

$ ls /opt/rcc/gnu/lib64 | grep libboost

When you've determined which sub-library you need, use the following command to compile your program using g++. Replace YOURCODE with the name of your C++ file, YOUREXECUTABLE with the name of your executable file, and YOURSUBLIBRARY with the name of your sub-library.

$ g++ YOURCODE.cpp -o YOUREXECUTABLE -I /opt/hpc/gnu/include -L /opt/hpc/gnu/lib64/libboost_YOURSUBLIBRARY.a 

This will compile your program into an executable with the specified name. If you're using the C++11 standard, you may have to add -std=c++11 to the above compiler call after g++. For more information on Boost, please refer to the official documentation.