[Qgis-developer] C++ Tim Sutton applications , Compile Error

Dario Magri dario.magri at gmail.com
Mon Aug 2 10:48:30 EDT 2010


Hi,
I have a problem on my Application. I want implement the simple application
that is showed in the developer guide (page 20, TIm Sutton application).

I follow this example but when I try to compile I have this errors:

1>C:\OSGeo4W\apps\qgis-dev\include\qgsapplication.h(25) : error C2470:
'QgsApplication' : looks like a function definition, but there is no
parameter list; skipping apparent body
1>C:\OSGeo4W\apps\qgis-dev\include\qgsproviderregistry.h(40) : error C2470:
'QgsProviderRegistry' : looks like a function definition, but there is no
parameter list; skipping apparent body
1>c:\osgeo4w\apps\qgis-dev\include\qgis.h(29) : error C2470: 'QGis' : looks
like a function definition, but there is no parameter list; skipping
apparent body
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(31) : error C2470: 'QgsVector'
: looks like a function definition, but there is no parameter list; skipping
apparent body
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(62) : error C2470: 'QgsPoint'
: looks like a function definition, but there is no parameter list; skipping
apparent body
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(187) : error C4430: missing
type specifier - int assumed. Note: C++ does not support default-int
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(187) : error C2143: syntax
error : missing ',' before '&'
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(188) : error C2803: 'operator
==' must have at least one formal parameter of class type
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(188) : error C2805: binary
'operator ==' has too few parameters
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(189) : error C2065: 'p1' :
undeclared identifier
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(189) : error C2228: left of
'.x' must have class/struct/union
1>        type is ''unknown-type''
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(189) : error C2065: 'p2' :
undeclared identifier
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(189) : error C2228: left of
'.x' must have class/struct/union
1>        type is ''unknown-type''
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(189) : error C2228: left of
'.y' must have class/struct/union
1>        type is ''unknown-type''
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(189) : error C2228: left of
'.y' must have class/struct/union
1>        type is ''unknown-type''
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(195) : error C4430: missing
type specifier - int assumed. Note: C++ does not support default-int
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(195) : error C2143: syntax
error : missing ',' before '&'
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(198) : error C2065: 'p' :
undeclared identifier
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(198) : error C2228: left of
'.toString' must have class/struct/union
1>        type is ''unknown-type''
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(198) : error C2228: left of
'.toLocal8Bit' must have class/struct/union
1>c:\osgeo4w\apps\qgis-dev\include\qgspoint.h(198) : error C2228: left of
'.data' must have class/struct/union
1>c:\osgeo4w\apps\qgis-dev\include\qgsrectangle.h(36) : error C2470:
'QgsRectangle' : looks like a function definition, but there is no parameter
list; skipping apparent body
1>c:\osgeo4w\apps\qgis-dev\include\qgsrectangle.h(140) : error C2653:
'QgsRectangle' : is not a class or namespace name
1>c:\osgeo4w\apps\qgis-dev\include\qgsrectangle.h(140) : fatal error C1903:
unable to recover from previous error(s); stopping compilation
1>main.cpp
1>C:\OSGeo4W\apps\qgis-dev\include\qgsapplication.h(25) : error C2470:
'QgsApplication' : looks like a function definition, but there is no
parameter list; skipping apparent body
1>Generating Code...


Can anyone help me pls?

Thx, Bye
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20100802/b17e793d/attachment-0001.html


More information about the Qgis-developer mailing list