[Gdal-dev] Building GDAL by MinGW

Frank Warmerdam warmerdam at pobox.com
Mon Aug 25 12:12:13 EDT 2003


Hisaji Ono wrote:
> Hi, Mr. Vine.
> 
> I can't still build GDAL by MinGW.
> 
> I tried to build latest gdal-cvs-030825 using following option under , as
> you said, "separate" MinGW building environment. And gcc version number is
> 3.2.3.
> 
> ./configure --prefix=$MINGW --host=i686-pc-mingw32  --with-libz=internal --w
> ith-png=internal --with-libtiff=internal  --with-geotiff=internal --without-
> jpeg --without-python --without-pg
> 
> However I've got following error messages.
> 
> cplgetsymbol.cpp: In function `void* CPLGetSymbol(const char*, const
> char*)':
> cplgetsymbol.cpp:174: invalid conversion from `int (*)()' to `void*'
> make[1]: *** [cplgetsymbol.o] Error 1
> make[1]: Leaving directory `/home/Administrator/gdal-cvs-030825/port'
> make: *** [port-target] Error 2
> 
> Could you give me any suggestion to deal with this error and go forward.


Hisaji,

Assuming line 174 reads:
    pSymbol = GetProcAddress( (HINSTANCE) pLibrary, pszSymbolName );

Try changing it to:
    pSymbol = (void*) GetProcAddress( (HINSTANCE) pLibrary, pszSymbolName );

If this fixes the issue let me know and I will correct the master.  The
code in this win32 implementation was written for VC++ and this may be the
first time it has been used with another compiler.

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    | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list