[Gdal-dev] Re: MinGW & GDAL: "[Linker error] undefined reference..."

J.Krueger kruegerj at gmx.de
Tue Jul 27 19:51:11 EDT 2004

Frank Warmerdam wrote:
>> Mhh... the only change I see is that you're using 'GDALDatasetH' now 
>> instead of GDALDataset. Is that all I'd have to change? As I said in 
>> my first post - I'm a mere beginner as far as C/C++ is concerned. 
>> Basically I'm using my need for the tool I work on as a motivation to 
>> learn C++, so some stupid questions are to be expected... ;)
> Well, now instead of calling GetRasterXSize() (or GetXSize()?) on the
> GDALDataset object, I am now calling GDALGetRasterXSize() and passing in
> the GDALDatasetH.  Basically, there are C API functions corresponding to
> most C++ methods.  Use it that way and you will be OK.

Yeah, I found those - didn't read your quote thoroughly enough. So 
basically I change any call like

<variable> = <dataset>-><instruction>;
<variable> = GDAL<instruction>(<dataset>);

and it will work? Nice!

 > Though of course you won't learn so much about C++.

I think I'll get enough chances to do that once I try translating the 
library myself... For the moment I'm just happy that I got it working at 

Thank you (and all the others that helped me)!

More information about the Gdal-dev mailing list