news at onastick.clara.co.uk
Sun Dec 23 11:33:07 UTC 2012
In article <email@example.com>, Tony
Pombo <mcp at technologist.com> writes
>This has not been my experience. I created a static library for Taglib 1.5
>on Visual Studio 2005, years ago, and included the .LIB files in Visual
>Studio 2005, 2008, and 2010 projects. Compiling a DLL should similarly be
>Maybe I did something unusual, but it works for me.
Yes, static libs should be fine because the run time dependencies will
be resolved when your app is linked. DLL's (probably) won't because
their run time dependencies need to be met when the DLL itself is
linked. If you bring up dependency viewer on one, you'll see links to
things like MSVCRTxx.dll where 'xx' is the Microsoft compiler version
that it was built with.
I say *probably* because you might be able to build something that will
work. Coming from a "C" background, if you change the compiler settings
from dynamic to static then the DLL itself gets statically linked to the
run time libraries. However you then need to be careful about passing
around run time objects between your app and the DLL so things like 'C'
file handles aren't interchangeable. Memory that is allocated in the DLL
also needs to be free'd in the DLL ie. your app can't call 'free'.
Keeping in mind then how much dynamic memory allocation is performed in
C++ this would probably be a non-starter.
So in a nutshell - you should be able to use the 'C interface in this
manner but not the C++ one.
== jon bird - software engineer
== <reply to address _may_ be invalid, real mail below>
== <reduce rsi, stop using the shift key>
== posted as: news 'at' onastick 'dot' clara.co.uk
More information about the taglib-devel