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

Frank Warmerdam fwarmerdam at gmail.com
Wed May 11 09:22:50 EDT 2005


On 5/11/05, Thom DeCarlo <t.r.decarlo at larc.nasa.gov> wrote:
> 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:

Thom,

As I'm sure you are aware, MINGW+cygwin is not a supported build environment.
I have never tried it myself though I understand others have been successful. 
 
> 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?

The configure script tries linking a program that calls fseek64.  If that
works, it is assumed that the platform has the fopen64, fseek64, 
ftell64, and stat64 functions and the stat64 type for stat buffers.  That
assumption is either wrong in your case, or we are missing some sort
of include file needed for stat64.  I don't know the solution.

If you don't especially need large file IO (read/write of files larger
than 2GB) then you could just configure "--without-unix-stdio-64".  
That should disable all this stuff.

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