[Gdal-dev] Re: MinGW & GDAL: "[Linker error] undefined reference..."
J.Krueger
kruegerj at gmx.de
Mon Jul 26 21:13:09 EDT 2004
Ok, I thought I had managed it, but while I can open files now, I am now
getting this damn error again - only this time not for all gdal
instructions. For example I can open/close datasets, but I can't query
them for certain (any?) information:
-cut-
Dataset1 = (GDALDataset *) GDALOpen( filename1, GA_ReadOnly );
int xsizefile1 = Dataset1->GetRasterXSize();
int ysizefile1 = Dataset1->GetRasterYSize();
-cut-
results in the following error messages:
[Linker error] undefined reference to `GDALDataset::GetRasterXSize()'
[Linker error] undefined reference to `GDALDataset::GetRasterYSize()'
The mere opening of the Dataset does not cause any problems. As soon as
I uncomment the GetRasterXSize/GetRasterYSize instructions the program
compiles properly and the Image files can be accessed.
Any ideas? Do I have to add something more to my compiler/linker
switches, or is it just a problem with the code? If I'm still missing a
switch: where can I find some detailed info/documentation on what is
needed, so I don't have to ask here every time?
More information about the Gdal-dev
mailing list