I am a Qt/C++ developer. I have to create a GUI application (Qt/C++) with GIS maps. I'm trying to do that using QGIS.
I'm working in Linux Ubuntu with Qt Creator 2.4.1 (based on Qt 4.8.0).
I did the following steps:
- I installed QGIS packages (QGis starts correctly)
- Then I downloaded QGIS source files.
Now I'm trying to create a simple Hello World QGIS application, but something doesn't work.
My programs has just one main.cpp file. The code is:
#include "qgsapplication.h"
int main(int argc, char ** argv)
{
QgsApplication app(argc, argv, true);
return 0;
}
The .pro file is:
#-------------------------------------------------
#
# Project created by QtCreator 2015-05-15T09:58:00
#
#-------------------------------------------------
QT += core gui
TARGET = TestQGIS
TEMPLATE = app
INCLUDEPATH += /home/pesce/qgis-2.8.1/src/core/
SOURCES += main.cpp
HEADERS +=
I'm trying to compile but the following error is shown:
/home/pesce/GUI/TestQGIS/../../qgis-2.8.1/src/core/qgsapplication.h:23: error: qgsconfig.h: No such file or directory
It seems that qgsconfig.h is missing......
Which is the problem? How can I fix this problem?
There was a libraries problem..not all the needed libraries were included! I've included all the libraries and now all the needed files are correctly present.
But I'm not still able to compile the code.... the following error is shown: /usr/include/qgis/qgsapplication.h:55: error: 'override' does not name a type
It seems a problem of the compiler..
Any suggestion?