[Gdal-dev] Re: Compiling swigged wrappers under MinGW

Charlie Savage cfis at interserv.com
Fri Jun 23 06:55:34 EDT 2006


Ari,

Not sure if this is helpful anymore, but....

The trick with MingW I've found is link directly against the dlls. 
Don't bother with dlltool and .lib files.

So:

g++ -shared somedll.dll my_code.o -o mydll.dll

I've had good luck with the Ruby bindings and MinGW.

Charlie


Ari Jolma wrote:
> Ari Jolma kirjoitti:
>> I almost got the (perl) wrappers compiled under MinGW. The remaining 
>> problem is that ogr.dll and osr.dll won't like to be loaded at the 
>> same time. The swig interface ogr.i imports osr.i so that might cause 
>> the problem. However the problem does not exist in unix so I'm not yet 
>> sure what's going on.
> 
> Talking a bit to myself but anyway, I managed to build the modules and 
> my test code runs the same as in Linux. The generated dll's are a bit 
> large but that could probably be improved. The DLL problems -- which 
> were hard!...:-( -- seem to be related to the Perl module building 
> process and the way it uses the MinGW dlltool. Even the swigwin is not 
> perfect at least for Perl target. I'll post my results later on a webpage.
> 
> Good night,
> 
> Ari
> 




More information about the Gdal-dev mailing list