[Mapserver-users] trouble compiling mapserver with ogr

Moritz Lennert mlennert at club.worldonline.be
Thu Apr 29 04:29:55 EDT 2004


Frank Warmerdam said:
> Moritz Lennert wrote:
>> All of them resulting in the same compile error:
>>
>> gcc -O2  -Wall -DIGNORE_MISSING_DATA  -DUSE_EPPL -DUSE_PROJ
>> -DUSE_PROJ_API_H -DUSE_WMS_SVR       -DUSE_JPEG -DUSE_GD_PNG
>> -DUSE_GD_JPEG
>> -DUSE_GD_WBMP -DUSE_GD_FT -DUSE_PDF  -DUSE_OGR -DUSE_GDAL -DUSE_POSTGIS
>> -I/usr//include         -I/usr/include -I/usr/include
>> -I/usr/include/postgresql     shp2img.o  -L. -lmap -L/usr//lib -lgd
>> -ljpeg
>> -lfreetype -lpng -lz   -lpdf -ljpeg -lfreetype -lpng -lz   -lproj -ljpeg
>> -L/usr/lib -lgdal   -L/usr/lib -lpq      -lm -lstdc++   -o shp2img
>> ./libmap.a(mapogr.o)(.text+0x15b): dans la fonction «
>> ogrGeomPoints(OGRGeometry*, shapeObj*)    »:
>> : undefined reference to `OGRGeometryCollection::getNumGeometries()'
>> ./libmap.a(mapogr.o)(.text+0x2b7): dans la fonction «
>> ogrGeomPoints(OGRGeometry*, shapeObj*)    »:
>
> Hi,
>
> Is there any possibility that the OGR on your system was built with a
> difference version of gcc than you are using for MapServer?  C++ linkage
> naming conventions in object code have varied somewhat between versions of
> gcc, so if you are using a different gcc than was used to build GDAL/OGR,
> then
> you might get surprising issues like the above.  This is especially common
> if
> you got the GDAL/OGR from some other source (ie. RPMs or .deb's from
> elsewhere).
>
> If this is the issue, then I would suggest you build and install GDAL/OGR
> from source on your system.
>

I did build GDAL/OGR from CVS sources on my system, and both config logs
show: gcc (GCC) 3.3.3 20040125 (prerelease) (Debian).



> Note, at some point I would like to move mapogr.cpp to using the OGR C API
> specifically to avoid the overly intimate relationship between MapServer
> and
> OGR.  This should make it much easier to mix and match in the future.


Great idea, where is this on your long list of tasks ;-)

Moritz



More information about the mapserver-users mailing list