Compiling and linking to the ql library?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling and linking to the ql library?

jcorominas
Hi

I installed Quantlib on Suse Linux 0.3.9 with no error. Where do I find the individual main program executables for the examples like EuropeanOption.cpp?

When I tried to compile and link one of the examples "EuropeanOption.cpp" in a separate directory I got many compile errors. I tried following the instructions below

>To use QuantLib classes in your own code just add
>    #include <ql/quantlib.hpp>

>at the beginning of your source/header files. Depending on the number of your files in your project, this could >cause a large increase in compilation time. If this were not acceptable, collective headers are also available for >smaller parts of the library; in particular, each subdirectory of the ql directory contains a file all.hpp which >makes available all classes and function in the respective subdirectory.
>Under the Examples folder you can find examples of QuantLib usage, including input files for automake and >makefiles for the Borland free compiler and Microsoft Visual C++. For the latter, project files are also available.

Is there anything I am missing?

Thanks

Jose
[hidden email]
mobile: 07765-476-831


Reply | Threaded
Open this post in threaded view
|

Re: Compiling and linking to the ql library?

Dirk Eddelbuettel
On 14 June 2005 at 19:53, [hidden email] wrote:
| I installed Quantlib on Suse Linux 0.3.9 with no error. Where do I find the
individual main program executables for the examples like EuropeanOption.cpp?
[...]
| Is there anything I am missing?

A quick look at my debian/rules files suggests that I call configure with
--enable-examples to get the examples built for the Debian packages.  Maybe
you simply need to add that flag?

Hth, Dirk

--
Statistics: The (futile) attempt to offer certainty about uncertainty.
         -- Roger Koenker, 'Dictionary of Received Ideas of Statistics'


Reply | Threaded
Open this post in threaded view
|

Re: Compiling and linking to the ql library?

Luigi Ballabio
In reply to this post by jcorominas
On 06/14/2005 08:53:11 PM, [hidden email] wrote:
>
> I installed Quantlib on Suse Linux 0.3.9 with no error. Where do I
> find the individual main program executables for the examples like
> EuropeanOption.cpp?

You can run 'make examples' from the root QuantLib dir to build the  
executables.

Cheers,
        Luigi

----------------------------------------

Innovation is hard to schedule.
-- Dan Fylstra