[Gdal-dev] same code, different result?
Frank Warmerdam
warmerdam at pobox.com
Thu Dec 15 09:49:53 EST 2005
On 12/15/05, gislif <gislf at 126.com> wrote:
>
> Hello,
>
> Why the same code has diferent result? I have the following
> code in two deferent seperate program to generate dataset, one program
> (which has only these codes )is ok ,the other(which has other program
> writen by qt ) failed. why? seting mistake?
>
>
> int main( int argc, char **argv )
> {
> //
> GDALDataset *poDataset;
> GDALRasterBand *poBand;
>
> GDALAllRegister();
>
> poDataset = (GDALDataset *) GDALOpen( "c:\output.jpg", GA_ReadOnly );
"gislif",
Does the above really work? My understanding is that the backslash
would always get interpreted as an escape character on the "o"
so you would end up trying to open the file "c:output.jpg" which would
depend on your current directory. In C/C++ I always double backslashes
in paths.
eg.
GDALOpen( "C:\\output.jpg", GA_ReadOnly );
I am not aware of any reason GDAL should work differently in a Qt
app than not in a Qt app.
Best regards,
--
---------------------------------------+--------------------------------------
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