[Mapserver-users] Problems compiling mapserv with OGR support.
Frank Warmerdam
warmerdam at pobox.com
Tue Mar 30 10:05:59 PST 2004
Sebastien Vincent wrote:
> Hello everybody :)
>
> First excuse me for my english, I'm french :)
>
> I'm trying to enable OGR support for mapserv, so I'm trying to compile
> it as follow :
> [root at nostalgia mapserver-4.0.1]# ./configure
> --with-ogr=../gdal-1.2.0b/apps/gdal-config \
> --with-gdal=../gdal-1.2.0b/apps/gdal-config
> [root at nostalgia mapserver-4.0.1]# make
>
> But i've lots of errors durring make (configure scripts works fine) :
>
>> [root at nostalgia mapserver-4.0.1]# make
>> gcc -O2 -Wall -DIGNORE_MISSING_DATA -DUSE_EPPL -DUSE_TIFF
>> -DUSE_JPEG -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT
>> -DUSE_GDAL -I/usr/include
>> -I/root/applications/mapserver/gdal-1.2.0/root/applications/mapserver/gdal-1.2.0b/b/port
>> -I/root/applications/mapserver/gdal-1.2.0b/gcore
>> -I/root/applications/mapserver/gdal-1.2.0b/alg
>> -I/root/applications/mapserver/gdal-1.2.0b/ogr
>> -I/root/applications/mapserver/gdal-1.2.0b/ogr/ogrsf_frmts
>> shp2img.o -L. -lmap -lgd -L/usr/lib -lgd -ljpeg -lfreetype -lpng
>> -lz -ltiff -ljpeg -lfreetype -lpng -lz -ljpeg -lm
>> -lstdc++ -o shp2img
>> ./libmap.a(mapgdal.o)(.text+0x11): In function `msGDALInitialize':
>> : undefined reference to `GDALAllRegister'
>> ./libmap.a(mapgdal.o)(.text+0x19): In function `msGDALInitialize':
>> : undefined reference to `CPLQuietErrorHandler'
>> ./libmap.a(mapgdal.o)(.text+0x1e): In function `msGDALInitialize':
>> : undefined reference to `CPLPushErrorHandler'
Sebastien,
It seems the GDAL library was not included in your link line. You can likely
just edit MapServer's Makefile and set set the GDAL_LIB something like:
GDAL_LIB=-L/root/applications/mapserver/gdal-1.2.0b -lgdal
More generally, there were some problems with GDAL 1.2.0 with the output
of the gdal-config command that sits "within the build". One approach to
work around this might be to install GDAL into a tree somewhere (ie. make
install). It might also be helpful to see what gdal reports if you do:
gdal-config --libs
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