[gdal-dev] Qt5.2.1+GDAL1.11+VC10: ogrsf_frmts.h compile errors

Even Rouault even.rouault at mines-paris.org
Wed May 14 04:30:54 PDT 2014


Le mardi 13 mai 2014 16:44:03, David Tran a écrit :
> Hi
> 
> test.pro
> 
> > TEMPLATE = app
> > TARGET = test
> > DEPENDPATH += $$PWD/src $$PWD/include
> > INCLUDEPATH += $$PWD/src $$PWD/include
> > SOURCES += src/main.cpp
> 
> main.cpp
> 
> > //#include "ogr_api.h"
> > #include "ogrsf_frmts.h"
> > int main() {}
> 
> It compiles fine with #include "ogr_api.h", but with #include
> "ogrsf_frmts.h" it has this error log:
> 
> http://pastebin.com/8ersPTd4
> 
> Why doesn't it compile?

It compiles from what I can see. The error is at linking stage. You need to 
link against gdal_i.lib

As those are rather basic C++ development questions, not particularly related 
to GDAL specificities, perhaps you should try to find guidance from someone a 
bit closer to you to get you started more efficiently.

> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list