--out-implib when linking shared libraries

Krasimir Angelov kr.angelov at gmail.com
Sat May 16 08:22:09 EDT 2009

I remember that the .dll.a libraries that GCC produces are not always
compatible with MSVC. Sometimes it works if you rename them to .lib
but sometimes it doesn't. It is much more realiable to create .lib
from .def file via some of the MS tools. If GCC can link dynamic
libraries without using the static library then it might be good idea
not to build the import libraries at all.


On Sat, May 16, 2009 at 1:26 PM, Duncan Coutts
<duncan.coutts at worc.ox.ac.uk> wrote:
> On Sat, 2009-05-16 at 11:07 +0100, Neil Mitchell wrote:
>> I don't, although having that option wouldn't be a bad thing - having
>> a minimal .lib is perfectly reasonable as a default. Having a massive
>> .lib seems crazy. (The fact that .lib is named .dll.a isn't too much
>> of an issue)
> It's possible to create a minimal import lib via a .def file (which
> lists the exports). I think the dlltool helps with that.
>> > So my suggestion is remove it, if you're linking using gcc it should
>> > work.
>> I'm not linking the .dll at all, only using dynamic linking, which
>> works without the .lib. But I don't really want to start removing
>> files - doing that in a build system seems like a bad idea.
> Sure, so at least you don't have to install them.
> Duncan
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

More information about the Glasgow-haskell-users mailing list