sudo port install boost
Boost should install in /opt/local by default.
2) Then download quantlib. You want to download the tar.gz package and extract it
tar -xzvf QuantLib
3) To install QuantLib(in terminal)
./configure -enable-static –with-boost-include=/opt/local/include/ –with-boost-lib=/opt/local/lib/ –prefix=/opt/local/
4) And at last
make && sudo make install
5) And then try to compile the examples(terminal). For example
g++ -I /opt/local/include/ -I/opt/local/include/boost BermudanSwaption.cpp -o bermudanoption -L/opt/local/lib/ -lQuantLib
6) Edit ~/.bash_profile, add the following lines into the file
export CPLUS_INCLUDE_PATH=/opt/local/include
export C_INCLUDE_PATH=/opt/local/include
export DYLD_LIBRARY_PATH=/opt/local/lib