xlw - quantlib

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

xlw - quantlib

ku pao
I am trying to use Jens Theils libxll to call ql functions. After
compiling QL in Project->settings->c++->codegeneration to
MT-DEBUG mode , I see the "quantlib_d.lib" file.

Now when I compile the libxll example project xllexample with the european
option, i get lots of link errors.
xllexample project is in mulithreaded-debug-dll mode

Your help appreciated.




Reply | Threaded
Open this post in threaded view
|

Re: xlw - quantlib

Kris .
KP & Qler's

I have had simillar problems with QL and libxll , the issues seems to be that
QL is best compiled in a static Multithreaded mode. And libxll requires to be compiled as Multithreaded DLL. So the visual c libraries conflict.

Quantlib.lib when you do a dumpbin has libcmt.lib and libcprt.lib

and this conflicts with the msvcrt.lib etc that come with the multithreaded dll compilation of libxll.
I am not sure what the solution if you find something please let me know.

Thanks
Kris


----- Original Message -----
From: "ku pao" <[hidden email]>
Date: Mon, 18 Aug 2003 21:39:17 -0000 (UTC)
To: [hidden email]
Subject: [Quantlib-users] xlw - quantlib

> I am trying to use Jens Theils libxll to call ql functions. After
> compiling QL in Project->settings->c++->codegeneration to
> MT-DEBUG mode , I see the "quantlib_d.lib" file.
>
> Now when I compile the libxll example project xllexample with the european
> option, i get lots of link errors.
> xllexample project is in mulithreaded-debug-dll mode
>
> Your help appreciated.
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Quantlib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users

--
__________________________________________________________
Sign-up for your own personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers



Reply | Threaded
Open this post in threaded view
|

RE: xlw - quantlib

Jens Thiel-2
Hi everyone,

I must have broken a mirror or something like that: shredded my surfboard,
came back ill from holidays just to find one of my harddisks crashed w/o any
recent backups :-(  And literally thousands of Sobig.F worms in my Inbox as
well (it seems that someone who had my email in his address book is running
an infected system - I've got people complaining that they got infected
emails from my address, but these are faked and not send from any system
under my control).


To answer the most common question, I will try to explain the different
library options. But before that: remember to ALWAYS compile every single
module (libraries and the final executable) with the same library settings.
Ignore or comment out any warnings or errors you get from traps in the
source code that try to force a special setting (static vs. dynamic).

Debug and Release should be clear.

Now decide if you need multithreading. Excel won't call your add-in on
different threads, so single-threading will be sufficient in this case. On
the other hand, MT won't hurt much on performance, so you probably want to
always choose multi threaded libs (I do).


The difference between static and dynamic libraries is in how MSVC builds
the executable:

"Multithreaded DLL" tells the linker to use the shared DLLs; this means that
you you have to deploy them to the users with your add-in. This setting
allows multiple programs to share some code if they use EXACTLY the same
DLLs in EXACTLY the same locations. This is a good solution in a scenario
with multiple tools (add-ins) linked against the very same DLL in the
System32 directory. It helps to save some memory when these are all running
at the same time since the DLLs are only loaded once. There is some slight
overhead in performance, but that should be neglectable.

"Multithreaded" alone means that the MSVC library code is compiled into your
add-in, and you can use it without shipping any additional DLLs (have you
ever seen software running on your developer box failing on the user's
machine...?). The add-in will be slightly larger though and a little bit
faster. You can see the difference if you look at the shared library
dependencies of the resulting DLL. There is no functional difference between
the static and the dynamic libs either.


I tend to prefer the static setting since I can easily deploy my
executables, and my code will always run with the libraries that it has been
tested with. No chance of DLL hell here...

 
With that in mind, I suggest that you check all your settings and rebuild
all projects.

Best regards,

Jens.




-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Kris .
Sent: Saturday, August 23, 2003 2:00 AM
To: [hidden email]; [hidden email]
Subject: Re: [Quantlib-users] xlw - quantlib


KP & Qler's

I have had simillar problems with QL and libxll , the issues seems to be
that QL is best compiled in a static Multithreaded mode. And libxll requires
to be compiled as Multithreaded DLL. So the visual c libraries conflict.

Quantlib.lib when you do a dumpbin has libcmt.lib and libcprt.lib

and this conflicts with the msvcrt.lib etc that come with the multithreaded
dll compilation of libxll.
I am not sure what the solution if you find something please let me know.

Thanks
Kris


----- Original Message -----
From: "ku pao" <[hidden email]>
Date: Mon, 18 Aug 2003 21:39:17 -0000 (UTC)
To: [hidden email]
Subject: [Quantlib-users] xlw - quantlib

> I am trying to use Jens Theils libxll to call ql functions. After
> compiling QL in Project->settings->c++->codegeneration to MT-DEBUG
> mode , I see the "quantlib_d.lib" file.
>
> Now when I compile the libxll example project xllexample with the
> european option, i get lots of link errors. xllexample project is in
> mulithreaded-debug-dll mode
>
> Your help appreciated.