The Boost header files are installed in /usr/include/boost and the libraries in /usr/lib.
To compile and link with Boost, add the Boost libraries you are using to the command as follows:
g++ pgm.cpp -lboost_whatever -o pgm
- Replace pgm.cpp with the name of the file containing your source code.
- Replace boost_whatever with the name of a Boost library you are using.
- Replace pgm with the name of the executable to be created.
For example, to use boost_filesystem library code: