mingw32-opensc package

Kevin Kofler kevin.kofler at chello.at
Mon Mar 23 23:28:20 UTC 2009

Erik van Pienbroek wrote:
> Yes there is. It is necessary for libtool to find out what the
> dependencies are of libraries (for example, when linking some
> application against glib, you also need to link against gettext). This
> is especially the case when using static libraries. Another reason for
> it is so that libtool can find the .dll (in ../bin) which belongs to
> the .dll.a import library.

Well, in principle MinGW can also link just fine without .la files. There's
one thing though: in ELF (e.g. native Fedora), at least with the current
GNU ld (I've read gold behaves differently), if you link a.so and if a.so
links b.so, you also automatically have access to b.so's exports. PE DLLs
(as used by Window$/MinGW) don't work that way, if you link a.dll and if
a.dll links b.dll, you still don't get access to b.dll's exports unless you
link in b.dll explicitly. .la files are one of the ways to work around
that. Static libraries (even ELF static libraries) behave similarly to PE
DLLs with respect to this, which is where the (oversimplified) maxim
that ".la files are only/mainly useful for static linking" comes from. And
in all cases, if the client program explicitly links the libraries it
needs, a .la file won't be needed or useful.

        Kevin Kofler

More information about the mingw mailing list