Boost c++ library install
I am not familiar with the usual build technique in linux I am using boost c++ library. Can any body guide me in installin开发者_开发百科g and configuring boost c++ library. Thanks in advance
My environment is Linux Fedora 15. On it, one can easily install boost by typing,
$ yum install boost-devel
After installation, you'll find boost under /usr/include/boost/
.
However, if you run,
$yum install boost
you'll only find .so of boost under /usr/lib/
, like /usr/lib/libboost_timer.so.1.48.0
.
It's OK if you're not familiar with the usual build technique because Boost doesn't use the usual build technique. Follow the instructions in the "getting started" documentation. Make sure you read all the way to the bottom of the page. The link to the Unix-specific instructions is at the very, very bottom.
For most parts of Boost, installation is synonymous with unpacking the tarball into your preferred include directory. Other parts of Boost require compilation, so go to the Boost installation directory, run ./bootstrap.sh
, and then run ./bjam install
.
depending on the Linux distribution you are using, you'll probably find boost is already built and packaged for you, e.g. on Fedora "yum install boost"
Rob Kennedy's answer is still valid except that is recommended now to install with ./b2 instead of ./bjam.
精彩评论