[Qgis-developer] Re: SVN TRUNK: Problems compiling third party app using qgis libs

Tim Sutton tim at linfiniti.com
Wed Feb 7 11:36:45 EST 2007


Hi again

To answer my own question a little it seems to be CORE_EXPORT e.g.

class CORE_EXPORT QgsPoint

That is causing my problems....I guess application needs to define this now?

Regards

Tim


On 2/7/07, Tim Sutton <tim at linfiniti.com> wrote:
> Hi
>
> I'm trying to get my openModeller stuff (which uses qgis libs for map
> display) to compile against trunk built with cmake. I use
> QgsApplication as the base class for openModeller Desktop but there is
> a hiccup when compiling (see below). Its using the headers put into
> /usr/local/include/qgis after doing a make install in qgis. Does
> anyone have an idea whats potting here?
>
> Thanks
>
> Tim
>
> make[2]: Entrando no diretório
> `/home/timlinux/dev/cpp/openModellerDesktop/src/gui'
> g++ -c -pipe -O2 -w -D_REENTRANT  -DQGISPLUGINDIR=/usr/local/lib/qgis
> -DWITH_QGIS -DWITH_LOCAL_PLUGIN -DWITH_WEBSERVICES_PLUGIN
> -DOMG_NO_EXPERIMENTAL -DQT_NO_DEBUG -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT
> -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
> -I/usr/local/Trolltech/Qt-4.2.0/mkspecs/linux-g++ -I.
> -I/usr/local/Trolltech/Qt-4.2.0/include/QtCore
> -I/usr/local/Trolltech/Qt-4.2.0/include/QtCore
> -I/usr/local/Trolltech/Qt-4.2.0/include/QtNetwork
> -I/usr/local/Trolltech/Qt-4.2.0/include/QtNetwork
> -I/usr/local/Trolltech/Qt-4.2.0/include/QtGui
> -I/usr/local/Trolltech/Qt-4.2.0/include/QtGui
> -I/usr/local/Trolltech/Qt-4.2.0/include/QtXml
> -I/usr/local/Trolltech/Qt-4.2.0/include/QtXml
> -I/usr/local/Trolltech/Qt-4.2.0/include/Qt3Support
> -I/usr/local/Trolltech/Qt-4.2.0/include/Qt3Support
> -I/usr/local/Trolltech/Qt-4.2.0/include -I/usr/local/include/qgis
> -I../lib -I../lib/modellerplugins -I../widgets -I../../obj/moc
> -I../../obj/ui -o ../../obj/o/linux/main.o main.cpp
> /usr/local/include/qgis/qgspoint.h:26: error: invalid function declaration
> /usr/local/include/qgis/qgspoint.h:124: error: expected ',' or '...'
> before '&' token
> /usr/local/include/qgis/qgspoint.h:124: error: ISO C++ forbids
> declaration of 'QgsPoint' with no type
> /usr/local/include/qgis/qgspoint.h:124: error: 'bool operator==(int)'
> must have an argument of class or enumerated type
> /usr/local/include/qgis/qgspoint.h:124: error: 'bool operator==(int)'
> must take exactly two arguments
> /usr/local/include/qgis/qgspoint.h: In function 'bool operator==(int)':
> /usr/local/include/qgis/qgspoint.h:126: error: 'p1' was not declared
> in this scope
> /usr/local/include/qgis/qgspoint.h:126: error: 'p2' was not declared
> in this scope
> /usr/local/include/qgis/qgspoint.h: At global scope:
> /usr/local/include/qgis/qgspoint.h:132: error: expected ',' or '...'
> before '&' token
> /usr/local/include/qgis/qgspoint.h:132: error: ISO C++ forbids
> declaration of 'QgsPoint' with no type
> /usr/local/include/qgis/qgspoint.h: In function 'std::ostream&
> operator<<(std::ostream&, int)':
> /usr/local/include/qgis/qgspoint.h:135: error: 'p' was not declared in
> this scope
> /usr/local/include/qgis/qgsrect.h: At global scope:
> /usr/local/include/qgis/qgsrect.h:35: error: invalid function declaration
> /usr/local/include/qgis/qgsrect.h:132: error: expected initializer
> before '::' token
> /usr/local/include/qgis/qgsrect.h:136: error: 'QgsRect' has not been declared
> /usr/local/include/qgis/qgsrect.h: In function 'void setXmin(double)':
> /usr/local/include/qgis/qgsrect.h:138: error: 'xmin' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h: At global scope:
> /usr/local/include/qgis/qgsrect.h:141: error: 'QgsRect' has not been declared
> /usr/local/include/qgis/qgsrect.h: In function 'void setXmax(double)':
> /usr/local/include/qgis/qgsrect.h:143: error: 'xmax' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h: At global scope:
> /usr/local/include/qgis/qgsrect.h:146: error: 'QgsRect' has not been declared
> /usr/local/include/qgis/qgsrect.h: In function 'void setYmin(double)':
> /usr/local/include/qgis/qgsrect.h:148: error: 'ymin' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h: At global scope:
> /usr/local/include/qgis/qgsrect.h:151: error: 'QgsRect' has not been declared
> /usr/local/include/qgis/qgsrect.h: In function 'void setYmax(double)':
> /usr/local/include/qgis/qgsrect.h:153: error: 'ymax' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h: At global scope:
> /usr/local/include/qgis/qgsrect.h:156: error: 'QgsRect' has not been declared
> /usr/local/include/qgis/qgsrect.h:156: error: non-member function
> 'double xMax()' cannot have cv-qualifier
> /usr/local/include/qgis/qgsrect.h: In function 'double xMax()':
> /usr/local/include/qgis/qgsrect.h:158: error: 'xmax' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h: At global scope:
> /usr/local/include/qgis/qgsrect.h:161: error: 'QgsRect' has not been declared
> /usr/local/include/qgis/qgsrect.h:161: error: non-member function
> 'double xMin()' cannot have cv-qualifier
> /usr/local/include/qgis/qgsrect.h: In function 'double xMin()':
> /usr/local/include/qgis/qgsrect.h:163: error: 'xmin' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h: At global scope:
> /usr/local/include/qgis/qgsrect.h:166: error: 'QgsRect' has not been declared
> /usr/local/include/qgis/qgsrect.h:166: error: non-member function
> 'double yMax()' cannot have cv-qualifier
> /usr/local/include/qgis/qgsrect.h: In function 'double yMax()':
> /usr/local/include/qgis/qgsrect.h:168: error: 'ymax' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h: At global scope:
> /usr/local/include/qgis/qgsrect.h:171: error: 'QgsRect' has not been declared
> /usr/local/include/qgis/qgsrect.h:171: error: non-member function
> 'double yMin()' cannot have cv-qualifier
> /usr/local/include/qgis/qgsrect.h: In function 'double yMin()':
> /usr/local/include/qgis/qgsrect.h:173: error: 'ymin' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h: At global scope:
> /usr/local/include/qgis/qgsrect.h:176: error: 'QgsRect' has not been declared
> /usr/local/include/qgis/qgsrect.h:176: error: non-member function
> 'double width()' cannot have cv-qualifier
> /usr/local/include/qgis/qgsrect.h: In function 'double width()':
> /usr/local/include/qgis/qgsrect.h:178: error: 'xmax' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h:178: error: 'xmin' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h: At global scope:
> /usr/local/include/qgis/qgsrect.h:181: error: 'QgsRect' has not been declared
> /usr/local/include/qgis/qgsrect.h:181: error: non-member function
> 'double height()' cannot have cv-qualifier
> /usr/local/include/qgis/qgsrect.h: In function 'double height()':
> /usr/local/include/qgis/qgsrect.h:183: error: 'ymax' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h:183: error: 'ymin' was not declared
> in this scope
> /usr/local/include/qgis/qgsrect.h: At global scope:
> /usr/local/include/qgis/qgsrect.h:186: error: 'QgsPoint' does not name a type
> /usr/local/include/qgis/qgsrect.h:190: error: expected ',' or '...'
> before '&' token
> /usr/local/include/qgis/qgsrect.h:190: error: ISO C++ forbids
> declaration of 'QgsRect' with no type
> /usr/local/include/qgis/qgsrect.h: In function 'std::ostream&
> operator<<(std::ostream&, int)':
> /usr/local/include/qgis/qgsrect.h:190: error: redefinition of
> 'std::ostream& operator<<(std::ostream&, int)'
> /usr/local/include/qgis/qgspoint.h:132: error: 'std::ostream&
> operator<<(std::ostream&, int)' previously defined here
> /usr/local/include/qgis/qgsrect.h:192: error: 'r' was not declared in this scope
> /usr/local/include/qgis/qgis.h: At global scope:
> /usr/local/include/qgis/qgis.h:35: error: invalid function declaration
> /usr/local/include/qgis/qgsmapcanvas.h:62: error: invalid function declaration
> /usr/local/include/qgis/qgsmapcanvas.h:93: error: invalid function declaration
> /usr/local/include/qgis/qgsmaptool.h:32: error: invalid function declaration
> /usr/local/include/qgis/qgsapplication.h:21: error: invalid function declaration
> main.cpp: In function 'int main(int, char**)':
> main.cpp:54: error: 'QgsApplication' was not declared in this scope
> main.cpp:54: error: expected `;' before 'myApp'
> main.cpp:112: error: 'myApp' was not declared in this scope
> main.cpp:121: error: 'myApp' was not declared in this scope
> main.cpp:135: error: 'myApp' was not declared in this scope
> make[2]: ** [../../obj/o/linux/main.o] Erro 1
> make[2]: Saindo do diretório
> `/home/timlinux/dev/cpp/openModellerDesktop/src/gui'
> make[1]: ** [sub-gui-make_default] Erro 2
> make[1]: Saindo do diretório `/home/timlinux/dev/cpp/openModellerDesktop/src'
> make: ** [sub-src-make_default] Erro 2
>
>
> --
> --
> Tim Sutton
>
> Visit http://qgis.org for a great Open Source GIS
> Home Page: http://linfiniti.com
> Skype: timlinux
> MSN: tim_bdworld at msn.com
> Yahoo: tim_bdworld at yahoo.com
> Jabber: timlinux
> Irc: timlinux on #qgis at freenode.net
>


-- 
-- 
Tim Sutton

Visit http://qgis.org for a great Open Source GIS
Home Page: http://linfiniti.com
Skype: timlinux
MSN: tim_bdworld at msn.com
Yahoo: tim_bdworld at yahoo.com
Jabber: timlinux
Irc: timlinux on #qgis at freenode.net



More information about the Qgis-developer mailing list