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

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

Thank you all!  I did #3 successfully.
 
Nick

On Wed, Apr 16, 2008 at 4:42 AM, Lecuyer, Fabrice <[hidden email]> wrote:
Thank you very much Erik for that.

I played around with my configuration and you were right, I added 3) after doing 1).

So if I understand well, including auto_link.hpp is the best way when you have an external project, setting the dependancies is another way when the project is in the same solution.

Merci,
Fabrice

-----Original Message-----
From: Eric Ehlers [mailto:[hidden email]]
Sent: Tuesday, 15 April 2008 10:16 PM
To: Lecuyer, Fabrice
Cc: [hidden email]
Subject: Re: [Quantlib-users] how does one use QuantLib in a new Visual Studioproject? (basic question)

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



************** IMPORTANT MESSAGE *****************************
This e-mail message is intended only for the addressee(s) and contains information which may be
confidential.
If you are not the intended recipient please advise the sender by return email, do not use or
disclose the contents, and delete the message and any attachments from your system. Unless
specifically indicated, this email does not constitute formal advice or commitment by the sender
or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries.
We can be contacted through our web site: commbank.com.au.
If you no longer wish to receive commercial electronic messages from us, please reply to this
e-mail by typing Unsubscribe in the subject line.
**************************************************************




-------------------------------------------------------------------------
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


-------------------------------------------------------------------------
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