Boost logo

Boost-Build :

Subject: [Boost-build] setup the environment variable correctly on OS X 10.4
From: norman (norman_khine_at_[hidden])
Date: 2009-04-01 09:01:56

I have followed the setup guide for building boost on OS X 10.4.

Here is my procedure for building boost and libraries:


$ cd ~/downloads
$ gunzip -dc boost_1_38_0.tar.gz | tar xvf -
$ cd boost_1_38_0
$ vim example.cpp

$ echo 1 2 3 | ./example
3 6 9

$ ./configure --prefix=/usr/local
Building Boost.Jam with toolset darwin... tools/jam/src/bin.macosxppc/bjam
Detecting Python version... 2.3
Detecting Python root... /System/Library/Frameworks/Python.framework/Versions/2.3
Unicode/ICU support for Boost.Regex?... not found.
Backing up existing Boost.Build configuration in user-config.jam.2
Generating Boost.Build configuration in user-config.jam...
Generating Makefile...

$ sudo make install
...skipped <p/usr/local/lib>libboost_unit_test_framework-xgcc40-mt.a for lack of <p/usr/local/lib>libboost_unit_test_framework-xgcc40-mt-1_38.a...
...failed updating 76 targets...
...skipped 146 targets...
Not all Boost libraries built properly.

$ cd ~/Documents/Tutorials/Boost/
$ vim example.cpp

$ c++ -I /Users/khinester/downloads/boost_1_38_0 example.cpp -o example /Users/khinester/downloads/boost_1_38_0/libs/regex/build/gcc/libboost_regex-gcc-d-1_38.a
$ ./example < jayne.txt
Will Success Spoil Rock Hunter?

So far so good, I guess ;)

But, I would like to know what do I need to do to setup the environment variable correctly so that I don't need to specify -I /Path/to/Boost when compiling.

Do I have to update my:

$ vim ~/.profile

What should be the correct way to do this?


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at