[gdal-dev] Re: Link GDAL with MinGW

Ari Jolma ari.jolma at tkk.fi
Thu Feb 26 09:54:34 EST 2009


LF kirjoitti:
> 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 
>> impossible.
>>     
> 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?

Ari


More information about the gdal-dev mailing list