Quantlib runtime issues
Posted by Mathias Zetterqvist on Jun 19, 2005; 3:10am
URL: http://quantlib.414.s1.nabble.com/Quantlib-runtime-issues-tp3848.html
Hi, I want to use quantlib in an external application. This
application will call an dll where I
want to put my own code. So I have this settings
External application <-> My own dll <-> Quantlib (<-> Boost)
When I compile the quantlib everything works fine, untill i want to
use the lib:s from the code compiled as a dll (the "My own dll" part).
The runtime library differs and this will cause a linking error. The
lib I have for Quantlib (which i compiled with the default settings)
is QuantLib-vc71-mt-sgd-0_3_9.lib but the linker looking for
QuantLib-vc71-mt-gd-0_3_9.lib.
I tried to do like this
1) Switched the runtime library in quantlib to "Multi-threaded debug
DLL" (/MDd switch) and
compiled the code. Boost have several different libs depending on the
runtime, so hopefully the correct
boost library will be used.
2) Quantlib will compile with this settings but the name on the file
will still be the same. Then
i changed the name on the file.
3) I could now link this library to my dll application and everything
worked fine.
But is this a good way (or even a possible way) to sovle the linking
issue? Will I run into problems later?
Has anyone else used QuantLib in a dll? Which settings shall I use to
make it possible?
Best regards
/Mathias Zetterqvist