views:

340

answers:

3

According to Boost download instructions for Linux http://www.boost.org/doc/libs/1_42_0/more/getting_started/unix-variants.html I should extract the Boost library to some directory on my computer. I am working with Ubuntu, Eclipse and CDT. What is right directory to install Boost? Somewhere in /usr or in my home directory?

+2  A: 

You should extract it to your home directory so you can build those libraries that need building (if you want to do a full install). IIRC bjam install defaults to somewhere in /usr or /usr/local (sorry, can't remember) but I'm pretty sure you can override the exact location on the command line.

I'd put it somewhere where it's unlikely to clash with a system-wide install of boost. If you're the only developer on this machine, I'd leave it in your home directory as there really isn't much point in moving it somewhere else. Just make sure you adjust the include and library paths accordingly.

Timo Geusch
+1  A: 

Boost is also available in the Ubuntu repositories -- for example,

sudo apt-get install libboost1.40-dev will install the development files for boost. This is probably the best option if you don't need the absolute most recent version (looks like the latest available on Ubuntu 9.10 is 1.40).

John Ledbetter
Thank you. I just wanted to ask about Ubuntu repositories. In the Synaptic window I see libboost1.40-dev. Does this mean that by selecting this package, or using "apt-get install libboost-dev " I will get the whole Boost ready-to-use, including binaries?Though I need 1.41 version, which I am already using in the Windows OS, I can try 1.40.
Alex Farber
Yes, I would use `libboost1.40-dev` -- I just tried `libboost-dev` and it wanted to install an older version.
John Ledbetter
Thank you! I will try to install 1.40 by easy way, and test whether it supports everything I need. Maybe some time later 1.41 will be available in repository.Just to be sure, does this installation make EVERYTHING, including libraries? I am using Boost packages which require libraries, like Boost.Thread.
Alex Farber
A: 

For future reference: Trying to install Boost 1.40 using apt-get and Synaptic, I encountered many problems: some files could not be downloaded, verified etc. Also, this installation doesn't seem to build the Boost libraries. Finally, I installed the Boost manually following this manual: http://ubuntuforums.org/showthread.php?t=1180792

I accepted all default directories, it is installed in /usr/local. I tested both inline functions and libraries, for now it looks OK.

Alex Farber