[Ubuntu] cpp and python codes not able to access gdal library
alassane toure
atourej at gmail.com
Wed Sep 7 22:38:50 PDT 2016
Group,
I developed a gdal code on my local machine and it worked. Having gdal and
g++ working on the server my compilation of the same code resulted in the
following response...
gcc -o applymask applymask.cpp -I /usr/include/gdal -lgdal -lm
applymask.cpp: In function âint main(int, char**)â:
applymask.cpp:63:95: warning: ignoring return value of âCPLErr
GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int, int,
GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg*)â, declared with
attribute warn_unused_result [-Wunused-result]
Band->RasterIO( GF_Read, 0, iLine,nXSize, 1, inScanline, nXSize,
1, GDT_Float32,0, 0 );
^
applymask.cpp:64:101: warning: ignoring return value of âCPLErr
GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int, int,
GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg*)â, declared with
attribute warn_unused_result [-Wunused-result]
maskBand->RasterIO( GF_Read, 0, iLine,nXSize, 1, maskScanline,
nXSize, 1, GDT_Float32,0, 0 );
^
applymask.cpp:75:94: warning: ignoring return value of âCPLErr
GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int, int,
GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg*)â, declared with
attribute warn_unused_result [-Wunused-result]
outBand->RasterIO( GF_Write, 0, iLine,nXSize, 1, outScanline, nXSize, 1,
GDT_Float32,0, 0 );
Also, my python code does not import all refered libraries including gdal.
File "/usr/local/bin/CD4DEM.py", line 12, in <module>
import gdalImportError: No module named gdal
Your help is appreciated.
Alassane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/ubuntu/attachments/20160907/e60d27fe/attachment.html>
More information about the Ubuntu
mailing list