<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<p style="margin: 0px; text-indent: 0px;">Hello,</p>
<p style="margin: 0px; text-indent: 0px;">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: </p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">#include <iostream></p>
<p style="margin: 0px; text-indent: 0px;">using namespace std;</p>
<p style="margin: 0px; text-indent: 0px;">#include "gdal_priv.h"</p>
<p style="margin: 0px; text-indent: 0px;">#include "cpl_conv.h" // for CPLMalloc()</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">int main()</p>
<p style="margin: 0px; text-indent: 0px;">{</p>
<p style="margin: 0px; text-indent: 0px;"> GDALDataset *poDataset;</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;"> GDALAllRegister();</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;"> char *pszFilename</p>
<p style="margin: 0px; text-indent: 0px;"> pszFilename = "201010131445_VIS_006_GEO_EUR_16bpp.XPIF";</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;"> poDataset = (GDALDataset *) GDALOpen( pszFilename, GA_ReadOnly );</p>
<p style="margin: 0px; text-indent: 0px;"> if( poDataset == NULL )</p>
<p style="margin: 0px; text-indent: 0px;"> {</p>
<p style="margin: 0px; text-indent: 0px;">         cout << "poDataset is null" << endl; // prints</p>
<p style="margin: 0px; text-indent: 0px;">         return 0;</p>
<p style="margin: 0px; text-indent: 0px;"> }</p>
<p style="margin: 0px; text-indent: 0px;">}</p><p style="margin: 0px; text-indent: 0px;"><br></p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">and I get this error:</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">undefined reference to `GDALAllRegister'</p>
<p style="margin: 0px; text-indent: 0px;">collect2: ld returned 1 exit status</p>
<p style="margin: 0px; text-indent: 0px;">make: *** [gdal] Error 1</p><p style="margin: 0px; text-indent: 0px;"><br></p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">Do you know what I have to do to make it work?</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">Thank you and regards,</p>
<p style="margin: 0px; text-indent: 0px;">Alex</p>
</blockquote></div><br>
<br></blockquote></div><br>
</blockquote></div><br>