Blogger

Delete comment from: Tech Musings and Assorted Thoughts

Greetings chan, and thanks for working through the article. It helps debug the information provided.

Now path_to_boost_includes would typically be:

<boost_install_dir>

So if you extracted and installed boost at say /opt/boost/boost_1_37, then your include path directive will be:

-I/opt/boost/boost_1_37

The real include files will be under /opt/boost/boost_1_37/boost:

e.g. /opt/boost/boost_1_37/boost/regex.hpp

But in our code, we tend to follow the convention of including the boost directory in the include file name:

#include <boost/regex.hpp>

So, specifying till /opt/boost/boost_1_37 as the include path works well.

It is not much different if you are using a Windows compiler, like Microsoft C++ 14.0 or 15.0. There instead of -I, it will be /I - but the basic idea remains same.

On more recent Linux distros, where Boost comes as an optional package, if you install it, the include files are usually found under:

/usr/include/boost/...

So you don't need to specify -I/usr/include. The prebuilts libraries typically go into /usr/lib.

Dec 5, 2008, 1:58:00 PM


Posted to Getting Started with Boost

Google apps
Main menu