The problem below is nothing to do with GDAL, you just need to initialise the 
variable (probably by some kind of command line argument - argv[1] if nothing 
else). If that doesn't make sense, is there another programming language that 
you are more comfortable with?

Brad

-----Original Message-----
From: gdal-dev <gdal-dev-boun...@lists.osgeo.org> On Behalf Of Athin
Sent: Thursday, 1 November 2018 8:32 PM
To: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] How to Use Gdal in Microsoft Visual Studio C++

Hai All, 

My target just know want to try to display raster map, but i still stuck in 
this starting point. The code I run below will display an error

error c4700 uninitialized local variable 'pszFilename' used

can someone help me regarding this and what i need to with the file i download 
from this link:https://trac.osgeo.org/gdal/wiki/DownloadSource

where i need to add on VS2012?

Thank you and best regards

#include "gdal_priv.h"
#include "cpl_conv.h" // for CPLMalloc() #include "stdafx.h"
#include "gdal.h"


int main()
{
        class GDALDataset;
        const char *pszFilename;
        

    GDALDataset *poDataset;
        void CPL_DLL CPL_STDCALL GDALAllRegister(void);

    poDataset = (GDALDataset *) GDALOpen(pszFilename, GA_ReadOnly );
    if( poDataset == NULL )
        {}

}



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to