[Gdal-dev] Makefile problem with MingW

Norman Vine nhv at cape.com
Fri Nov 26 16:33:31 EST 2004


Frank Warmerdam 
> 
> Norman Vine wrote:
> >  Hi Frank
> > 
> > Is it possible to add a configure check for whether to use 
> >   cpl_vsil_win32.o 
> > instead of 
> >   cpl_vsil_unix_stdio_64.o
> > 
> > for the MingW build
> > 
> > As it is one has to hand edit the $(GDAL)/port/GNUMakefile
> > when building with MSYS or MingW
> > 
> > probably easiest to do this by adding a new variable to 
> > GDALmake.opt

> 
> OK, I would be happy to make such a change, but how do we drive it?  That is,
> how does configure now when it should set CPL_VSIL_STDIO to tif_vsil_win32.o
> instead of tif_vsil_unix_stdio_64.o?   Do I need to watch for a MINGW cannonical
> name for the platform or something like that?
> 
> Note, I don't use MINGW so a specific patch I can apply would be the safest
> way to approach this if you have the time to prepare one.

The easiest way is probably to just use a new proxy source file

$GDAL / port / cpl_vsil.cpp

HTH

Norman

==== cut === 

#include "cpl_vsi.h"

#ifdef _WIN32
 #include "cpl_vsil_win32.cpp"
#else
 #include "cpl_vsil_unix_stdio_64.cpp"
#endif





More information about the Gdal-dev mailing list