[Qgis-developer] Compiling QGis related Application

Tim Sutton tim at linfiniti.com
Thu Dec 20 07:44:58 EST 2007


Hi

What happens if you do:

DEFINES +=      CORE_EXPORT=""

Regards

Tim

2007/12/20, Murat AHAT <murat.ahat at gmail.com>:
> Hi Tim,
>
> Here is the .pro file, pretty simple:
> *********************************
> SOURCES += mainwindow.cpp
> INCLUDEPATH += /usr/include/qt4    \
>                 /usr/include/qt4/QtXml \
>                 /usr/include/qgis
> DEFINES +=      CORE_EXPORT
> **********************************
>
> As you said there is -DCORE_EXPORT. And other things too.
>
> Here is the compiler output:
> *********************************
> cd '/home/murat/workspace/Kdevelop/GisApp01' &&
> INCLUDEPATH="/usr/include/qgis" make
> g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_SHARED -DCORE_EXPORT
> -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I.
> -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore
> -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4
> -I/usr/include/qt4 -I/usr/include/qt4/QtXml -I/usr/include/qgis -I. -I.
> -o mainwindow.o mainwindow.cpp
> In file included from /usr/include/c++/4.1.3/backward/deque.h:59,
> from mainwindow.cpp:29:
> /usr/include/c++/4.1.3/backward/backward_warning.h:32:2: warning:
> #warning This file includes at least one deprecated or antiquated
> header. Please consider using one of the 32 headers found in section
> 17.4.1.2 of the C++ standard. Examples include substituting the <X>
> header for the <X.h> header for C++ includes, or <iostream> instead of
> the deprecated header <iostream.h>. To disable this warning use
> -Wno-deprecated.
> /usr/local/include/qgis/qgsapplication.h:21: error: expected identifier
> before numeric constant
> /usr/local/include/qgis/qgsapplication.h:21: error: expected
> unqualified-id before numeric constant
> /usr/local/include/qgis/qgsproviderregistry.h:38: error: expected
> identifier before numeric constant
> /usr/local/include/qgis/qgsproviderregistry.h:38: error: expected
> unqualified-id before numeric constant
> /usr/local/include/qgis/qgis.h:34: error: expected identifier before
> numeric constant
> /usr/local/include/qgis/qgis.h:34: error: expected unqualified-id before
> numeric constant
> ....
> ********************************************
>
> Thanks
>
> Murat
>
> On Thu, 2007-12-20 at 01:00 -0200, Tim Sutton wrote:
> > Hi
> >
> > Could you supply the whole .pro file? Also detailed compiler stdout
> > would help. You should be seeing something like -DCORE_EXPORT on
> > stdout when compiling...are you getting it?
> >
> > Regards
> >
> > Tim
> >
> > 2007/12/19, Murat AHAT <murat.ahat at gmail.com>:
> > > Dear All,
> > >
> > > I have just started to build a gis related application, and after some
> > > searching, i have chosen QGis to be one of my dependent platform
> > > together with Qt.
> > >
> > > I am using Ubuntu Gutsy with Kdevelop+QtDesigner.
> > >
> > > My Starting point was the First C++ Tutorial from the QGis Blog. I have
> > > installed QGis 0.9 as well as 0.8 and both of them giving the same
> > > errors:
> > >
> > > ....
> > > /usr/local/include/qgis/qgsapplication.h:21: error: expected identifier
> > > before numeric constant
> > > /usr/local/include/qgis/qgsapplication.h:21: error: expected
> > > unqualified-id before numeric constant
> > > /usr/local/include/qgis/qgsproviderregistry.h:38: error: expected
> > > identifier before numeric constant
> > > /usr/local/include/qgis/qgsproviderregistry.h:38: error: expected
> > > unqualified-id before numeric constant
> > > ......
> > >
> > > And those lines are the exact lines that class definitions take place.
> > >
> > > for example from "/usr/local/include/qgsapplication.h":
> > >
> > > 15:/* $Id: qgsapplication.h 7130 2007-08-09 04:06:41Z timlinux $ */
> > > 16:#ifndef QGSAPPLICATION_H
> > > 17:#define QGSAPPLICATION_H
> > > 18:
> > > 19:#include <QApplication>
> > > 20:
> > > 21:class CORE_EXPORT QgsApplication: public QApplication // line 21 here
> > > 22:{
> > > ....
> > >
> > > I have a line inside .pro file like "DEFINES += CORE_EXPORT".
> > >
> > > So, how can I fix these problems? Any idea or suggestion will be
> > > appreciated.
> > >
> > >
> > > Thanks in advance.
> > >
> > > Murat
> > >
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Qgis-developer mailing list
> > > Qgis-developer at lists.qgis.org
> > > http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
> > >
> >
> >
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>


-- 
Tim Sutton
QGIS Project Steering Committee Member - Release  Manager
Visit http://qgis.org for a great open source GIS
openModeller Desktop Developer
Visit http://openModeller.sf.net for a great open source ecological
niche modelling tool
Home Page: http://tim.linfiniti.com
Skype: timlinux
Irc: timlinux on #qgis at freenode.net



More information about the Qgis-developer mailing list