[Gdal-dev] Re: Compile Error

Paul Kelly paul-grass at stjohnspoint.co.uk
Tue Oct 14 16:10:15 EDT 2003


> ...
> > make[2]: Entering directory `/indigo-disk2/grass/gdal-libtool/frmts/gxf'
> > /bin/sh ../../libtool --mode=compile cc -I../../port -I../../gcore -I../../ogr    -c -o ../o/gxfdataset.o gxfdataset.cpp
> >  cc -I../../port -I../../gcore -I../../ogr -c gxfdataset.cpp  -DPIC -o ../o/.libs/gxfdataset.o
> > cfe: Error: ../../gcore/gdal_priv.h, line 176: Syntax Error
> >  class GDALMajorObject;
> >  ------^
>
> Paul,
>
> That is pretty funky.  I tried building on Linux and get this:
>
> warmerda at gdal[122]% make
> /bin/sh ../../libtool --mode=compile g++ -Wall  -g -DDEBUG  -I../../port -I../.
> /gcore -I../../ogr  -c -o gxfdataset.o gxfdataset.cpp
>   g++ -Wall -g -DDEBUG -I../../port -I../../gcore -I../../ogr -c gxfdataset.cpp
> -fPIC -DPIC -o .libs/gxfdataset.o
>   g++ -Wall -g -DDEBUG -I../../port -I../../gcore -I../../ogr -c gxfdataset.cpp
> o gxfdataset.o >/dev/null 2>&1
> /bin/sh ../../libtool --mode=compile gcc -Wall  -g -DDEBUG   -I../../port -I../
> ./gcore -I../../ogr  -c -o gxfopen.o gxfopen.c
>   gcc -Wall -g -DDEBUG -I../../port -I../../gcore -I../../ogr -c gxfopen.c  -fPI
>   -DPIC -o .libs/gxfopen.o
>
> In short, the makefile seems to know to use the configured C++ compiler for
> gxfdataset.cpp and the configured C compiler for the remaining .c files.   What
> are the CXX and CC macros set to in your GDALmake.opt?  I am assuming that since

Yes they are set up correctly to CC and cc respectively. All the C++ files
up to this point compiled OK. The interesting thing is that when I cd to
that particular directory and run make from there, it works fine and uses
the correct compiler (is that what you did above?) but when running make
recursively from the top-level directory the problem occurred.
I will look at it again when I have time tomorrow.

Paul

PS Please reply to me directly as I am only a digest subscriber now




More information about the Gdal-dev mailing list