Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux beginner, Where to put boost libraries?

I'm not extremely familiar with the linux filesystem, having moved from windows, but I do have a decent amount of experience with C++ and the Boost libraries in windows. Having switched Fedora 17, can anyone tell me if there is a certain directory where I should install Boost to get it working the gnu compiler?

Note: if it matters, I don't use an IDE I use vim for most of my programming.

like image 899
kjh Avatar asked Oct 14 '12 04:10

kjh


2 Answers

There are a few ways of setting up the boost libraries on linux.

  1. Save yourself some pain, use your package manager to install the Boost libs. You'll be grateful in the long run.

  2. If you absolutely must do it yourself, simply put it anywhere so long as it's in the gcc include path. This is /usr/local/include/ or /usr/include/ for headers and /usr/local/lib/ or /usr/lib/ for libraries

  3. Finally if for some reason that isn't possible, use the -I switch with g++ to specify the path to boost. (but this would only be necessary if 1 and 2 aren't possible)

like image 107
Daniel Gratzer Avatar answered Oct 26 '22 23:10

Daniel Gratzer


Use your package manager to install boost libraries, for debian ubuntu it is like:

sudo aptitude install libboost-system1.49.0-dev

for centos6 it is

yum install boost-devel
like image 33
zb' Avatar answered Oct 27 '22 01:10

zb'