Re: Quantlib project

Posted by P Nelnik on
URL: http://quantlib.414.s1.nabble.com/Quantlib-project-tp6945p6951.html

Thanks Jack,
I've now added this helpful information to the quantlib wiki:
    http://quantlib.referata.com/wiki/Installing_on_a_MAC

Philip

On Mon, Aug 30, 2010 at 7:28 PM, Jack Harvard <[hidden email]> wrote:

Spent some time installing QuantLib on my Mac, found no complete Installation Instructions for Snow Leopard online,  thought my experience below on how to install QuantLib on Mac could help somebody who tries to the same. 

First get macports(porticus is a nice gui to use) and install boost(and dependents).

1) To install boost(in terminal)

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

When this is done, restart the terminal, no Include or Link directory needs to be specified when compiling with g++. 

Note: the whole process takes two hours if installing both boost and QuantLib. 
Warning: the steps above work for me, however I haven't tested on another machine, please help to improve it if there's a better way. 

On Mon, Aug 30, 2010 at 11:14 AM, Luigi Ballabio <[hidden email]> wrote:
On Fri, 2010-08-27 at 04:16 -0700, [hidden email] wrote:
> I downloaded the project ang got the following error, what should I
> do?
>
> Error 3 fatal error C1083: Cannot open include file:
> 'boost/config.hpp': No such file or directory c:\quant\quantlib-1.0.1
> \ql\qldefines.hpp 29

You need the Boost libraries.
See the instructions at <http://quantlib.org/install/vc9.shtml>.

Luigi


--

The Feynman Problem Solving Algorithm:
1) Write down the problem.
2) Think very hard.
3) Write down the solution.



------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



--
Jack Harvard

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users