Reputation: 4785
I am not familiar with the usual build technique in linux I am using boost c++ library. Can any body guide me in installing and configuring boost c++ library. Thanks in advance
Upvotes: 27
Views: 85102
Reputation: 198
Since fedora people are accumulating here. I drop my working solution for fedora 36.
using dnf
sudo dnf install boost-devel
Most parts of boost was working with that. I had some issues finding boost_python
. So, I decided to compile it myself. Find other boost releases here.
wget https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz
tar xvf ./boost_1_78_0.tar.gz
cd boost_1_78_0
./bootstrap.sh
sudo ./b2 --layout=versioned --build-type=complete address-model=64 install -j 16
Upvotes: 2
Reputation: 51
Rob Kennedy's answer is still valid except that is recommended now to install with ./b2 instead of ./bjam.
Upvotes: 3
Reputation: 1333
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
.
Upvotes: 57
Reputation: 3266
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"
Upvotes: 2
Reputation: 163247
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
.
Upvotes: 14