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

Tim Sutton lists at linfiniti.com
Fri Aug 6 08:50:36 EDT 2010


Hi

Its hard to say without know what compiler you have used and how you
have set up your compilation environment. If you give some more
details we may be able to help.

Regards

Tim

On Mon, Aug 2, 2010 at 4:48 PM, Dario Magri <dario.magri at gmail.com> wrote:
> 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
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>



-- 
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Visit http://linfiniti.com to find out about:
 * QGIS programming and support services
 * Mapserver and PostGIS based hosting plans
 * FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================


More information about the Qgis-developer mailing list