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

Norman Vine nhv at cape.com
Thu May 27 04:12:21 EDT 2004


J.Krueger writes:
> 
> Norman Vine wrote:
> >>  "[Linker error] undefined reference to `GDALAllRegister'"
> >>  "[Linker error] undefined reference to `GDALOpen'"
> > What is the command you are using to link the program
> > 
> > Note Win32 does not allow undefined symbols so the order of the libraries 
> > presented to the linker is important
> 
> Here's the Makefile Dev-C++ is creating:
> 
> LIBS =  -L"C:/Dev-Cpp/lib" -L"C:/Dev-Cpp/gdal/lib"

I have never used Dev-C++ so I don't know exactly how
you enter this into the IDE but you need to link against libgdal

i.e. the link LIBS should be something like

LIBS =  -L"C:/Dev-Cpp/lib" -L"C:/Dev-Cpp/gdal/lib" -lgdal

HTH

Norman





More information about the Gdal-dev mailing list