[Qgis-developer] compiling QGIS application from tutorials

Saravanan Ponnuswamy psaravanan81 at gmail.com
Tue Apr 29 05:55:31 EDT 2008


Hi,

i had compiled qgis for my LInux PC and its working fine.now i need to
develop a standalone qgis application. i followed teh steps in the website:

http://blog.qgis.org/?q=node/10.


but i could not compile it successfully. the following are the errore:
saravanan at spa:~/workspace/QGIS_programming/mapDisplay> make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB
-DQT_CORE_LIB -DQT_SHARED -I../../../userQtopia/install_path/mkspecs/default
-I. -I../../../userQtopia/install_path/include/QtCore
-I../../../userQtopia/install_path/include/QtCore
-I../../../userQtopia/install_path/include/QtGui
-I../../../userQtopia/install_path/include/QtGui
-I../../../userQtopia/install_path/include
-I/home/saravanan/QGIS/qgis_0.9.1/src/app
-I/home/saravanan/QGIS/qgis_0.9.1/src/core
-I/home/saravanan/QGIS/qgis_0.9.1/src/gui -I. -I. -o main.o main.cpp
main.cpp:6:37: error: qgssinglesymbolrenderer.h: No such file or directory
In file included from main.cpp:9:
/home/saravanan/QGIS/qgis_0.9.1/src/gui/qgsmapcanvas.h:30:24: error:
QDomDocument: No such file or directory
In file included from /usr/include/c++/4.1.0/backward/deque.h:59,
                 from main.cpp:19:
/usr/include/c++/4.1.0/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.
main.cpp:65:2: warning: no newline at end of file
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsapplication.h:21: error: invalid
function declaration
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsproviderregistry.h:38: error:
invalid function declaration
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsmaplayerregistry.h:36: error:
invalid function declaration
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgis.h:34: error: invalid function
declaration
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:26: error: invalid
function declaration
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:127: error: expected ','
or '...' before '&' token
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:127: error: ISO C++
forbids declaration of 'QgsPoint' with no type
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:127: error: 'bool
operator==(int)' must have an argument of class or enumerated type
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:127: error: 'bool
operator==(int)' must take exactly two arguments
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h: In function 'bool
operator==(int)':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:129: error: 'p1' was not
declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:129: error: 'p2' was not
declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:127: warning: unused
parameter 'QgsPoint'
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:135: error: expected ','
or '...' before '&' token
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:135: error: ISO C++
forbids declaration of 'QgsPoint' with no type
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h: In function
'std::ostream& operator<<(std::ostream&, int)':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:138: error: 'p' was not
declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:135: warning: unused
parameter 'QgsPoint'
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:35: error: invalid
function declaration
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:132: error: expected
initializer before '::' token
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:136: error: 'QgsRect' has
not been declared
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: In function 'void
setXmin(double)':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:138: error: 'xmin' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:141: error: 'QgsRect' has
not been declared
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: In function 'void
setXmax(double)':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:143: error: 'xmax' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:146: error: 'QgsRect' has
not been declared
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: In function 'void
setYmin(double)':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:148: error: 'ymin' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:151: error: 'QgsRect' has
not been declared
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: In function 'void
setYmax(double)':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:153: error: 'ymax' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:156: error: 'QgsRect' has
not been declared
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:156: error: non-member
function 'double xMax()' cannot have cv-qualifier
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: In function 'double
xMax()':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:158: error: 'xmax' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:161: error: 'QgsRect' has
not been declared
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:161: error: non-member
function 'double xMin()' cannot have cv-qualifier
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: In function 'double
xMin()':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:163: error: 'xmin' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:166: error: 'QgsRect' has
not been declared
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:166: error: non-member
function 'double yMax()' cannot have cv-qualifier
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: In function 'double
yMax()':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:168: error: 'ymax' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:171: error: 'QgsRect' has
not been declared
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:171: error: non-member
function 'double yMin()' cannot have cv-qualifier
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: In function 'double
yMin()':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:173: error: 'ymin' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:176: error: 'QgsRect' has
not been declared
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:176: error: non-member
function 'double width()' cannot have cv-qualifier
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: In function 'double
width()':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:178: error: 'xmax' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:178: error: 'xmin' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:181: error: 'QgsRect' has
not been declared
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:181: error: non-member
function 'double height()' cannot have cv-qualifier
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: In function 'double
height()':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:183: error: 'ymax' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:183: error: 'ymin' was
not declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:186: error: 'QgsPoint'
does not name a type
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:190: error: expected ','
or '...' before '&' token
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:190: error: ISO C++
forbids declaration of 'QgsRect' with no type
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: In function
'std::ostream& operator<<(std::ostream&, int)':
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:190: error: redefinition
of 'std::ostream& operator<<(std::ostream&, int)'
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgspoint.h:135: error:
'std::ostream& operator<<(std::ostream&, int)' previously defined here
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:192: error: 'r' was not
declared in this scope
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h: At global scope:
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsrect.h:190: warning: unused
parameter 'QgsRect'
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsmaplayer.h:42: error: invalid
function declaration
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsfeature.h:47: error: invalid
function declaration
/home/saravanan/QGIS/qgis_0.9.1/src/core/qgsvectorlayer.h:67: error: invalid
function declaration
/home/saravanan/QGIS/qgis_0.9.1/src/gui/qgsmapcanvas.h:61: error: invalid
function declaration
/home/saravanan/QGIS/qgis_0.9.1/src/gui/qgsmapcanvas.h:92: error: invalid
function declaration
main.cpp: In function 'int main(int, char**)':
main.cpp:25: error: 'QgsApplication' was not declared in this scope
main.cpp:25: error: expected `;' before 'app'
main.cpp:32: error: 'QgsProviderRegistry' has not been declared
main.cpp:32: error: invalid type in declaration before '(' token
main.cpp:32: error: cannot convert 'QString' to 'int' in initialization
main.cpp:33: error: 'QgsVectorLayer' was not declared in this scope
main.cpp:33: error: 'mypLayer' was not declared in this scope
main.cpp:34: error: expected type-specifier before 'QgsVectorLayer'
main.cpp:34: error: expected `;' before 'QgsVectorLayer'
main.cpp:35: error: 'QgsSingleSymbolRenderer' was not declared in this scope
main.cpp:35: error: 'mypRenderer' was not declared in this scope
main.cpp:35: error: expected type-specifier before 'QgsSingleSymbolRenderer'
main.cpp:35: error: expected `;' before 'QgsSingleSymbolRenderer'
main.cpp:48: error: 'QgsMapLayerRegistry' has not been declared
main.cpp:48: error: expected initializer before '->' token
main.cpp:53: error: 'QgsMapCanvas' was not declared in this scope
main.cpp:53: error: 'mypMapCanvas' was not declared in this scope
main.cpp:53: error: expected type-specifier before 'QgsMapCanvas'
main.cpp:53: error: expected `;' before 'QgsMapCanvas'
main.cpp:64: error: 'app' was not declared in this scope
main.cpp:32: warning: unused variable 'instance'
main.cpp: At global scope:
main.cpp:22: warning: unused parameter 'argc'
main.cpp:22: warning: unused parameter 'argv'
make: *** [main.o] Error 1
saravanan at spa:~/workspace/QGIS_programming/mapDisplay>


can anyone provide me any suggestions or solutions for this ?


thanks in advance,

saravanan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20080429/e5eeb757/attachment-0001.html


More information about the Qgis-developer mailing list