On Monday 13 October 2014 13:41:11 Martin Landa wrote: > Hi, > > 2014-10-13 13:33 GMT+02:00 Martin Landa <[email protected]>: > > g++ -I /usr/local/include -L /usr/local/lib -lgdal main.cpp > > > > Error: > > > > undefined reference to GDALAllRegister > > solved, > > g++ mail.cpp -I /usr/local/include -L /usr/local/lib -lgdal > > works (so `-l` after cpp file). > > Strangely g++ 4.7 works on both commands. Only g++ 4.8 fails...
Yes, I've hit similar issues recently. Newer g++ are very picky about the order into which arguments appear on the command line for linking. You must put -L -l after the file that need them. > > Huh, sorry for the noise, Martin -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
