Qt Creator build project - no such file or directory
Sorry to be a nob, but I just switched from Window, Eclipse and Java to OpenSUSE, C ++ and Qt Creator and I ran into a problem. I am working on building a QGIS application, I have * .h files in / usr / include / gqis and * .so files in / usr / lib. I added this line
INCLUDEPATH += /usr/local/include/qgis
at the end of the .pro of the project file, so I can include the QGIS library. As far as I coded, everything went smoothly, but when I built the project, Qt Creator threw the error:
qgis.h: No such file or directory
/usr/include/qgis/qgsapplication.h
and displays on line 4:
#include <QtGui/QApplication>
#include "mainwindow.h"
#include <qgis/qgsvectorlayer.h>
#include <qgis/qgsapplication.h>
#include <qgis/qgsproviderregistry.h>
#include <qgis/qgssinglesymbolrenderer.h>
#include <qgis/qgsmaplayerregistry.h>
#include <qgis/qgsvectorlayer.h>
#include <qgis/qgsmapcanvas.h>
As far as I have searched, I still cannot solve this problem. Please help me?
+3
source to share
3 answers
You should:
INCLUDEPATH += /usr/local/include/qgis
and
#include <QtGui/QApplication>
#include "mainwindow.h"
#include <qgsvectorlayer.h>
#include <qgsapplication.h>
#include <qgsproviderregistry.h>
#include <qgssinglesymbolrenderer.h>
#include <qgsmaplayerregistry.h>
#include <qgsvectorlayer.h>
#include <qgsmapcanvas.h>
+1
source to share