chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] find-library only tests static libs on Windows?


From: Thomas Chust
Subject: Re: [Chicken-users] find-library only tests static libs on Windows?
Date: Tue, 05 May 2015 13:00:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 2015-05-05 02:08, Matt Gushee wrote:
> [...]
> But I'm wondering why I needed to do that. Is there some reason why it
> would be a bad idea, or would not work, for find-library to test DLLs as
> well as static libs?
> [...]

Hello,

while I am no expert on windows linkage madness, my understanding is
that you are not really supposed to link directly against a DLL, but
rather against a static import library that knows how to interface with
the DLL. While some compilers can magically synthesize an import library
given only a DLL and the right external function declarations, that is
not necessarily reliable and correct and should only be used as a last
resort when an import library is not available and cannot be compiled
from source.

That said, it usually does just work, especially if the DLL was
translated with the same compiler supporting magic imports.

I'm unsure whether the library detection code in the canvas-draw.setup
file should be changed. Perhaps the behaviour of find-library should
even be adapted in general, depending on the host compiler's capabilities.

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]