[Gdal-dev] how to write block by block to file

Frank Warmerdam warmerdam at pobox.com
Thu Jan 15 01:49:35 EST 2004


Pushkar Pradhan wrote:
>>What is poDriver?  Are you sure it isn't NULL?  dwtFile is a
>>proper filename?
>>Nothing to odd about imgXSize or imgYSize?  Assuming that poDriver is a
>>driver supporting the create call (such as GeoTIFF) things should be fine.
> 
> Oops, poDriver was NULL, so now I do get the driver name but getting these
> syntax errors:
> Redstone[1316] pushkar$ g++ -g -o main
> dwt-serial.cpp -Ierrs/ -Imisc/ -Iip/ -I../gdal-1.1.9/include/
> ../gdal-1.1.9/lib/libgdal.1.1.so
> dwt-serial.cpp: In function `int main(int, char **)':
> dwt-serial.cpp:61: request for member `GetDriverByName' in
> `GetGDALDriverManager', which is of non-aggregate type `GDALDriverManager *
> ()()'
> 
> Here's the code:
>   poDriver = (GDALDriver *)GetGDALDriverManager->GetDriverByName(pszFormat);

You need:

     poDriver = (GDALDriver *) GetGDALDriverManager()->GetDriverByName(pszFormat);

Good luck,

-- 
---------------------------------------+--------------------------------------
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 Gdal-dev mailing list