How to add compiler include paths and linker library paths for newly installed Boost?

Nav picture Nav · Nov 8, 2010 · Viewed 56.5k times · Source

I have RHEL 5.2, with Boost 1.33 installed. I downloaded boost_1_44_0.tar.bz2. and built it. On completion it showed:

The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

    /home/dfe/Archive/boost_1_44_0

The following directory should be added to linker library paths:

    /home/dfe/Archive/boost_1_44_0/stage/lib
  1. How do I add the above mentioned include paths?
  2. When I do "rpm -q boost", it shows boost-1.33.1-10.el5. Why is that so, when I've installed version 1.44?
  3. Is there a better way to install the latest version of Boost?

Answer

user2716834 picture user2716834 · Sep 30, 2015

There are always three steps to install software on Linux systems:

  1. configure — "check"
  2. make — "build software in current directory"
  3. make install — "copy files to the systems so the other software can use this software"

You likely did the equivalent of make but did not do the equivalent of make install. You need to run

sudo ./b2 install

after running ./b2