Posted by
Luigi Ballabio on
Jan 13, 2009; 8:57am
URL: http://quantlib.414.s1.nabble.com/Compilation-of-simple-console-application-with-QuantLib-vc90-mt-sgd-0-9-7-lib-tp7023p7024.html
Hi Boris,
On Mon, 2009-01-12 at 18:08 -0500, Boris Skorodumov wrote:
> I am a new user of QuantLib. I have compiled and run all test examples
> provided within Visual Studio 2008 with no problems.
> I would like to create simple project and link it with
> QuantLib-vc90-mt-sgd-0_9_7.lib.
Just checking: you're aware that QuantLib-vc90-mt-sgd-0_9_7.lib is
compiled in debug mode and is much slower than the release version,
right?
> I have created console application with default project settings
> except for:
>
> 4. Configuration Properties -> Linker->Input->Additional Dependencies
> QuantLib-vc90-mt-sgd-0_9_7.lib
This is not necessary. Instead of specifying the library directly, it's
better to add
#include <ql/auto_link.hpp>
to one of your source files. The above will try to pull in the correct
version of the library for your project settings, so that you won't have
linker errors like the ones you reported. The downside is that, if you
want to link a specific library you compiled (such as
QuantLib-vc90-mt-sgd-0_9_7.lib) you'll have to adjust your project
settings accordingly. In your case, I think you'll to choose debug mode
and to set Configuration Properties -> C/C++ -> Code Generation as
"Multi-threaded".
Luigi
--
I've finally learned what `upward compatible' means. It means we
get to keep all our old mistakes.
-- Dennie van Tassel
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users