1. Download the most recent version of Boost Libraries - http://sourceforge.net/projects/boost/files/boost/
2. Within the directory where you want to put the Boost Installation, execute the following:
- tar --bzip2 -xf /path/to/boost_1_45_0.tar.bz2
/Users/marklagatuz/Downloads
Lagatuz-MacBookPro:Downloads marklagatuz$ tar --bzip2 -xf boost_1_45_0.tar.bz2
You now have a working Boost Library consisting of Header files. If you would like to make sure of the compiled libraries ... continue on!
3. Set up the Boost Compiled Library
- Run the bootstrap strict with the --help option to receive options
- Create the directory where you would like the Boost Library Binaries to reside
/Users/marklagatuz/Downloads
Lagatuz-MacBookPro:Downloads marklagatuz$ mkdir boost_1_45_0_Compiled
- Change directory into the boost installation directory (header files only)
Lagatuz-MacBookPro:boost_1_45_0 marklagatuz$ pwd
/Users/marklagatuz/Downloads/boost_1_45_0
- Run the bootstrap script. I've added the following options:
- --prefix: is for my own installation directory choosing.
- --with-libraries. is for choosing which library binaries I want installed
Lagatuz-MacBookPro:boost_1_45_0 marklagatuz$ ./bootstrap.sh --prefix=/Users/marklagatuz/Downloads/boost_1_45_0_Compiled --with-libraries=all
- Finally, install the binaries (a /lib will be created inside the prefix directory)
Congratulations ... you have the Boost Libraries installed!
Integrating Boost with Eclipse
After a successful installation of Boost Libraries on your system, here are some steps to integrate the Library with Eclipse. I've installed on OS X, so a Linux flavor should be similar.
If you want to utilize the Library which are only inline and templates (non-compiled):
1. Within Eclipse: Go to Properties menu
- Project --> Properties
- C/C++ Build --> Settings --> GCC C++ Compiler --> Directories
- Add the location of your installed Boost Library Include Path (/Users/marklagatuz/Downloads/boost_1_43_0 for me)
If you want to utilize the Library which are compiled:
1. Within Eclipse: Go to Properties menu
- Project --> Properties
- C/C++ Build --> Settings --> GCC C++ Compiler --> Directories
- Add the location of compiled Boost Library Include Path (/Users/marklagatuz/Downloads/boost_compiled/include for me)
- C/C++ Build --> Settings --> GCC C++ Linker --> Libraries --> Library search path (-L)
- Add the location of the compiled Boost Library (/Users/marklagatuz/Downloads/boost_compiled/lib for me)
- C/C++ Build --> Settings --> GCC C++ Linker --> Libraries --> Libraries (-l)
- Add compiled Library name you would like to utilize
You are ready to utilize the Boost Library during your development!
--
Resources
1. Boost Getting Started Guide
- http://www.boost.org/doc/libs/1_45_0/more/getting_started/index.html
No comments:
Post a Comment