[gdal-dev] Linking MinGW app builds against VC++ built GDAL

Frank Warmerdam warmerdam at pobox.com
Wed Feb 13 02:02:52 EST 2008


Ari Jolma wrote:
> Frank Warmerdam kirjoitti:
>>
>> I'm not sure what the pexports and dlltool stuff is for.  I have
>> found I can link MingGW applications directly against gdal_i.lib
>> without any special stuff.
> 
> I use them to make the import lib. I can't make perl Makefile.PL accept 
> gdal_i.lib (which is annoying!) but if I edit it by hand into the 
> Makefiles everything works - almost, I get some errors from the 
> self-tests but they are also related to the version mismatches.

Ari,

I found with PROJ.4 and GRASS it was easiest to just copy
proj_i.lib to libproj.a in order to get past this sort of issues.
Perhaps you can just copy gdal_i.lib to libgdal.a?

>> Is it possible you are trying to build GDAL "trunk" bindings?
> 
> Yes, I was using the trunk version of wrappers.
> 
> However, I wonder how useful this is. Perl is packaged for cygwin and 
> probably I should use that (instead of the MinGW perl I've compiled 
> myself) for the OSGeo4W perl bindings for GDAL.

Despite the fact that I'm using the Cygwin "setup" program for OSGeo4W,
the actual OSGeo4W binaries are *not* cygwin based.  That is, they don't
link against the cygwin dlls and do all that magic unix-like stuff that
cygwin does.

They are either built with VC++ or MinGW/MSYS.  So I don't think a
cygwin perl will be of much assistance.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list