Sunday, 28 October 2012

Compiling a Boost program

Here is a sample Filesystem tutorial program

http://www.boost.org/doc/libs/1_50_0/libs/filesystem/example/tut1.cpp

We will try to compile this program

So Assuming that you have installed boost libraries. If not then read my previous post

Now to compile any boost related program we will be needing the header files, the libraries and the boost_root folder. Boost_root folder is the folder from where you have installed boost. In my previous post my boost_root is boost_1_50_0. Next step is very easy you have to run the following command in Terminal.

g++ tut1.cpp -o first -lboost_filesystem -lboost_system -I path/to/boost_1_50_0

Feel free to comment if the above command is not working for you