Re: how does one use QuantLib in a new Visual Studioproject? (basic question)

Posted by Eric Ehlers-2 on
URL: http://quantlib.414.s1.nabble.com/how-does-one-use-QuantLib-in-a-new-Visual-Studio-project-basic-question-tp6037p6039.html

Hi Fabrice,

> Note that when I did that myself, there was a point I couldn't
> make it
> compile without including auto_link.hpp. It now works fine
> wihtout it,
> but I don't know exactly why adding it at some point solved a
> problem.
> If somebody can enlighten me...

There are 3 ways to link QL into your project:

1) #include <ql/auto_link.hpp> - this directive appears in
quantlib.hpp.

2) List the QuantLib static library explicitly in your
project's link dependencies.  Not convenient nor recommended,
because the QL lib has a different name under each
configuration, e.g. QuantLib-vc80-mt-s-0_9_0.lib for Release,
QuantLib-vc80-mt-0_9_0.lib for Release CRTDLL, etc.

3) If your project and QuantLib reside in the same VC solution
file, and if you make the former dependent on the latter as you
explained in your message, then VC automatically gets the link
dependencies right even in the absence of 1) and 2).

If you needed 1) initially but don't any longer, maybe it's
because you implemented 3) in the interim.

Bonne journée,
Eric



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users