[Gdal-dev] Problems Linking to the gdal

Daniel Mac daniel.mac at elantech-inc.com
Wed Jun 23 17:35:05 EDT 2004


Hello, I am relatively new to this board, so please forgive if this question
has been answered, or if I went about the wrong way to post a question...

Im having trouble linking to the GDAL libraries.  I've downloaded and built
GDAL (1.1.9, 1.2.0, 1.2.0b, I've tried em all) for Solaris 2.8 using gcc and
gnumake...however, I am using the latest version of Sun Forte CC to build my
application, and when I try to link to the GDAL libraries (libgdal.a,
libgdal.so), I get the following error:

ild: (undefined symbol) GDALRasterBand*GDALDataset::GetRasterBand(int) --
referenced in the text segment of
/home/Projects/Deployment/Tencap/lib/SunOS-5.8//libTencap.a(_DTEDReader.o)
ild: (undefined symbol) void GDALRasterBand::GetBlockSize(int*,int*) --
referenced in the text segment of
/home/Projects/Deployment/Tencap/lib/SunOS-5.8//libTencap.a(_DTEDReader.o)
ild: (undefined symbol) int GDALRasterBand::GetYSize() -- referenced in the
text segment of
/home/jhughes/ElanTech/Projects/Deployment/Tencap/lib/SunOS-5.8//libTencap.a
(_DTEDReader.o)
ild: (undefined symbol) int GDALRasterBand::GetXSize() -- referenced in the
text segment of
/home/Projects/Deployment/Tencap/lib/SunOS-5.8//libTencap.a(_DTEDReader.o)
ild: (undefined symbol) int GDALDataset::GetRasterYSize() -- referenced in
the text segment of
/home/Projects/Deployment/Tencap/lib/SunOS-5.8//libTencap.a(_DTEDReader.o)
ild: (undefined symbol) OGRLinearRing::OGRLinearRing() -- referenced in the
text segment of
/home/Projects/Deployment/Tencap/lib/SunOS-5.8//libTencap.a(_FeatureReader.o
) 
...(there are more, but all the same...undefined symbol)...

I know they are defined in libgdal (via the nm -Ao command in solaris), but
they just aren't linking...

Question 1:  Ive tried to build GDAL with Sun Forte CC, only to run into
loads of problems; is there a proper way to build GDAL using Sun Forte CC
(required flags, settings at ./configure command, etc.?)

Question 2:  I've heard of incompatibilities between CC and gcc/g++; could
this problem just be a case of incompatibility??  If so, then any help in
building GDAL using CC would be greatly appreciated...

Thanks for all of your help in advance

Dan






More information about the Gdal-dev mailing list