[gdal-dev] gdal_priv.h not found on ubuntu
Matt Wilkie
maphew at gmail.com
Wed Oct 29 21:13:22 EDT 2008
> Try:
>
> g++ -I/usr/include/gdal hillshade.cpp -lgdal -o hillshade
Thank you for the suggestion, still no good though:
:~/src/demtools$ g++ -I/usr/include/gdal hillshade.cpp -lgdal -o hillshade
/usr/bin/ld: cannot find -lgdal
collect2: ld returned 1 exit status
:~/src/demtools$ g++ -I/usr/include/gdal hillshade.cpp -o hillshade
/tmp/ccisRgYI.o: In function `main':
hillshade.cpp:(.text+0x295): undefined reference to `GDALAllRegister'
hillshade.cpp:(.text+0x2a6): undefined reference to `GDALOpen'
hillshade.cpp:(.text+0x2d5): undefined reference to
`GDALDataset::GetRasterBand(int)'
hillshade.cpp:(.text+0x34b): undefined reference to `GDALRasterBand::GetXSize()'
hillshade.cpp:(.text+0x35a): undefined reference to `GDALRasterBand::GetYSize()'
hillshade.cpp:(.text+0x36f): undefined reference to `CPLMalloc'
hillshade.cpp:(.text+0x37d): undefined reference to `CPLMalloc'
hillshade.cpp:(.text+0x386): undefined reference to `GetGDALDriverManager'
hillshade.cpp:(.text+0x392): undefined reference to
`GDALDriverManager::GetDriverByName(char const*)'
hillshade.cpp:(.text+0x3d4): undefined reference to
`GDALDriver::Create(char const*, int, int, int, GDALDataType, char**)'
hillshade.cpp:(.text+0x43e): undefined reference to
`GDALDataset::GetRasterBand(int)'
hillshade.cpp:(.text+0x534): undefined reference to
`GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int,
int, GDALDataType, int, int)'
hillshade.cpp:(.text+0x9c5): undefined reference to
`GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int,
int, GDALDataType, int, int)'
collect2: ld returned 1 exit status
--
-matt
More information about the gdal-dev
mailing list