[Gdal-dev] Compiling gdal with MinGW/MSYS?

Norman Vine nhv at cape.com
Wed May 11 09:42:08 EDT 2005


Thom DeCarlo writes:
> 
> Hi,
> I'm trying for the first time to compile gdal with MinGW under Win2K. I
> think I've got all the required MinGW packages, but the build is failing
> with these messages:
> 
> 
> make[1]: Entering directory `/s/OSG/gdal/port'
> /bin/sh.exe ../libtool --mode=compile g++ -Wall  -O2    -I../port  -c -o 
> cpl_vsil_unix_stdio_64.o cpl_vsil_unix_stdio_64.cpp
>   g++ -Wall -O2 -I../port -c cpl_vsil_unix_stdio_64.cpp  -DDLL_EXPORT 
> -DPIC -o .libs/cpl_vsil_unix_stdio_64.o
> cpl_vsil_unix_stdio_64.cpp: In function `int VSIStat(const char*, 
> VSIStatBuf*)':
> cpl_vsil_unix_stdio_64.cpp:175: error: `stat64' undeclared (first use 
> this function)
> cpl_vsil_unix_stdio_64.cpp:175: error: (Each undeclared identifier is 
> reported only once for each function it appears in.)
> make[1]: *** [cpl_vsil_unix_stdio_64.o] Error 1
> make[1]: Leaving directory `/s/OSG/gdal/port'
> make: *** [port-target] Error 2
> 
> I suspect I'm missing something in the include path, but I thought the
> ./configure should have picked up all the appropriate stuff.
> 
> Can anyone give me more info about the proper setup of mingw for gdal?

Hi Thom

I had a similar problem and don't really know the correct way to fix this but ...

I just hand edited my cpl_config.h as attached and things seem to work OK

You will probably want to edit this line to reflect what is in your current file
This is what --prefix=WAS_SET_TO in your configure

/* --prefix directory for GDAL install */
#define GDAL_PREFIX "/usr/mingw"

HTH

Norman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpl_config.h
Type: application/octet-stream
Size: 4403 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20050511/44fa540e/cpl_config.obj


More information about the Gdal-dev mailing list