[Gdal-dev] build gdal with grass support error

Richard Greenwood rich at greenwoodmap.com
Wed May 26 04:29:47 EDT 2004


Frank Warmerdam wrote:
> 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,


Thanks Frank and Alessandro for the prompt replies. Changing 
(*GrassErrorHandler)(...) to (*GrassErrorHandler)() solved the problem.

I had updated from CVS last night, so unfortunately I guess it's not 
fixed in CVS.

Best regards,
-- 
Richard Greenwood
www.greenwoodmap.com



More information about the Gdal-dev mailing list