[gdal-dev] 1.4.4 Preliminary Win32 Binaries

Mateusz Loskot mateusz at loskot.net
Mon Nov 26 08:05:20 EST 2007


Ari Jolma wrote:
> Mateusz Loskot kirjoitti:
>> Ari Jolma wrote:
>>
>>> that would create quite a lot of extra stuff into headers but my guess
>>> is that it would make the resulting dll (made by VC) usable also in
>>> MinGW world (except that the name issue would still be there).
>>>
>>
>> DLL built with MingGW will be usable with Visual C++ (and vice versa)
>> only if separete/dedicated import libraries are prepared. Having .DEF
>> file
>> it's easier than not having it, but still, dedicated binary is required.
>
>
> By "usable" do you mean usable to link against or usable as a drop in
> replacement (as I tried here)?

I mean to "link against"

> By "dedicated binary" you do not mean a
> separate DLL for applications compiled with different compilers?

Not DLL but import library used to link to DLL definitions.

> If we forget the Colortable issue where the 1.4 bindings still use C++
> API of GDAL, my first guess is that if the export names were
> undecorated, I could use gdal14.dll as a drop in replacement of
> libgdal-1.dll, even though they are compiled with different compilers.

It should be feasible for C-only API but not C++.

> I'm very sure that if I go through the hoops and link against gdal14.dll
> everything will work. Note that with the tools in MinGW I can
> automatically create a usable .DEF and from that a usable .a for linking
> against (this .a is not a static library, it is some kind of link
> library for the dll).

This is exactly what I mean 2 sections above. You have one DLL but two or
more import libraries prepared for various compilers.

> I'm willing to go through the hoops once I get a 1.5 binary. By the way,
> I'd appreciate one already now so I could have a working method for
> compiling the Perl bindings against it. Having a GDAL DLL with most if
> not all drivers included would be a new thing for me. So far I've not
> been able to include JPEG2000 drivers for example.

I suppose it will be hard or impossible to get 3rd party dependencies
working with MinGW, like MrSID.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net


More information about the gdal-dev mailing list