[Gdal-dev] build gdal with grass support error

Frank Warmerdam warmerdam at pobox.com
Wed May 26 09:34:25 EDT 2004


Richard Greenwood wrote:
> I have a problem building GDAL with GRASS support under Linux.
> 
> First I built and installed libgrass (from www.remotesensing.org)
> 
> Next I try to build GDAL --with-grass=/usr/local/lib/ but it fails with 
> the following error messages:
> 
> make[2]: Entering directory `/usr/local/src/gdal/gdal_cvs/frmts/grass'
> /bin/sh ../../libtool --mode=compile g++ -Wall  -O2  -I/usr/local/lib/ 
> -I/usr/local/lib//include   -I../../port -I../../gcore -I../../ogr 
> -I../../port -c -o ../o/grassdataset.o grassdataset.cpp
>  g++ -Wall -O2 -I/usr/local/lib/ -I/usr/local/lib//include -I../../port 
> -I../../gcore -I../../ogr -I../../port -c grassdataset.cpp  -fPIC -DPIC 
> -o ../o/.libs/grassdataset.o
> grassdataset.cpp: In static member function `static GDALDataset*
>    GRASSDataset::Open(GDALOpenInfo*)':
> grassdataset.cpp:513: error: invalid conversion from `int (*)(...)' to 
> `int   (*)()'
> 
> Any idea what I am doing wrong?

Rich,

Not your fault.  There is a bug about this:

   http://bugzilla.remotesensing.org/show_bug.cgi?id=408

Just hand edit your code changing this:

   typedef int (*GrassErrorHandler)();

to this:
    typedef int (*GrassErrorHandler)(...);

or the other way around as needed.

I am vaguely hopeful that the code in CVS works properly.

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