[gdal-dev] Re: GDALAllRegister()
alejandra rodriguez
alexrl7 at gmail.com
Mon Feb 7 06:18:47 EST 2011
> Hello,
>>>
>>> I am starting using GDAL, I have downloaded the libraries and I'm trying
>>> to use them in my code, but when I try with the GDALAllRegister() function
>>> an error appears. I only have written this code:
>>>
>>> #include <iostream>
>>>
>>> using namespace std;
>>>
>>> #include "gdal_priv.h"
>>>
>>> #include "cpl_conv.h" // for CPLMalloc()
>>>
>>> int main()
>>>
>>> {
>>>
>>> GDALDataset *poDataset;
>>>
>>> GDALAllRegister();
>>>
>>> char *pszFilename
>>>
>>> pszFilename = "201010131445_VIS_006_GEO_EUR_16bpp.XPIF";
>>>
>>> poDataset = (GDALDataset *) GDALOpen( pszFilename, GA_ReadOnly );
>>>
>>> if( poDataset == NULL )
>>>
>>> {
>>>
>>> cout << "poDataset is null" << endl; // prints
>>>
>>> return 0;
>>>
>>> }
>>>
>>> }
>>>
>>>
>>> and I get this error:
>>>
>>> undefined reference to `GDALAllRegister'
>>>
>>> collect2: ld returned 1 exit status
>>>
>>> make: *** [gdal] Error 1
>>>
>>>
>>> Do you know what I have to do to make it work?
>>>
>>> Thank you and regards,
>>>
>>> Alex
>>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110207/343d45b6/attachment-0001.html
More information about the gdal-dev
mailing list