[gdal-dev] Re: Link GDAL with MinGW
ari.jolma at tkk.fi
Thu Feb 26 09:54:34 EST 2009
> Ari Jolma <ari.jolma <at> tkk.fi> writes:
>> MinGW gcc generates .dll.a files, which are the link libraries, but it
>> can also use the plain dll to link against.
>> However, when you mention gdal16.dll, it sounds like you're trying to
>> link against a GDAL dll that was generated with VC. The C++ API is very
>> difficult to use from such dll when you're developing with MinGW if not
> I'm not sure of this. In the same project I linked *correctly* hdf5 library,
> which is a dll file and I think compiled with VC.
> I've problem only with gdal.
> Perhaps it needs some flags when compile.
But you do use VC compiled GDAL DLL? HDF5 seems to be available in many
formats (for cygwin, vs2005, etc). I'm just looking at a hdf5dll.dll and
it does not export anything in C++, while gdal16.dll does. I believe gcc
is not able to decrypt the way VC exports C++ methods, which you are using.
Why don't you use the GDAL DLL that you get from compiling it with MinGW?
More information about the gdal-dev