[mapserver-users] gdal-h missing during compile of mapserver

Frank Warmerdam warmerdam at pobox.com
Mon Jul 29 08:43:17 EDT 2002


Don Holeman wrote:
> Greetings,
> 
> I am trying to build gdal into my first mapserver compilation. I have
> installed the gdal binary on my redhat 7.3 pc with the install.sh script,
> verified the path and done ldconfig. I configure it with the path
> appropriately set and during the make I get the message
> 
> In file included from mapraster.c:2:
> mapresample.h:44:20: gdal.h: No such file or directory
> mapraster.c:25:18: gdal.h: No such file or directory.
> 
> Indeed, there is no such file present, having been omitted from the binary
> tar. The missing header file is included in the src tar distributrion,
> however. Does this mean that I need to compile gdal from the src rather than
> simply install the linux binary? If so is there a follow-on instruction as
> to where to install the files, I could find none in the tar or on the site
> and the install.sh that comes with the src distribution appears to not have
> been configured at all. Assuming everything goes where the binary install.sh
> script puts them for the binary distribution, where would I put the gdal.h
> file? Instead of recompiling it all can I just copy over the needed files?

Don,

The binary GDAL distribution you are using for GDAL (is this a Freegis RPM?)
is not intended for development, and so does not include the include files.
You will need to build and install GDAL from source.  The "make install" target
should take care of installing everything in the right place, by default the
/usr/local tree with /usr/local/include used for include files.

If installing into a different location than the binary distribution you
should likely carefully remove the previous binary installation before
installing from source to avoid problems with two versions.

Note that it might be possible to use the include file from the source dist
with the binary dist if you are only using the GDAL support (which uses C
linkage) but if you are using the OGR support as well please don't do this.
The C++ interfaces are very sensitive to minor differences in the include
files and you might have all sorts of problems.

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 mapserver-users mailing list