[Qgis-developer] HELP!!geometryType() problem!!!
bonar
bonar_reddevil at yahoo.com
Wed Feb 25 22:50:32 EST 2009
i have a problem on compiling Tim Sutton's QGis Code Examples. Its give me an
error on this code
"QgsSingleSymbolRenderer *mypRenderer = new
QgsSingleSymbolRenderer(mypLayer->geometryType());"
no matching function for call to
`QgsSingleSymbolRenderer::QgsSingleSymbolRenderer(QGis::WKBTYPE)'.
But when i change the geometryType() to vectorType(), its give me a lot of
error;
debug/main.o(.text+0x15c): In function `Z5qMainiPPc':
D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/main.cpp:34: undefined
reference to `QgsApplication::QgsApplication(int&, char**, bool)'
debug/main.o(.text+0x230):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/main.cpp:38:
undefined reference to `QgsApplication::~QgsApplication()'
debug/main.o(.text+0x259):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/main.cpp:38:
undefined reference to `QgsApplication::~QgsApplication()'
debug/mainwindow.o(.text+0x1e5): In function
`ZN10MainWindowC2EP7QWidget6QFlagsIN2Qt10WindowTypeEE':
D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:57:
undefined reference to `QgsProviderRegistry::instance(QString)'
debug/mainwindow.o(.text+0x253):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:61:
undefined reference to `QgsMapCanvas::QgsMapCanvas(QWidget*, char const*)'
debug/mainwindow.o(.text+0x297):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:62:
undefined reference to `QgsMapCanvas::enableAntiAliasing(bool)'
debug/mainwindow.o(.text+0x2ad):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:63:
undefined reference to `QgsMapCanvas::useQImageToRender(bool)'
debug/mainwindow.o(.text+0x310):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:65:
undefined reference to `QgsMapCanvas::freeze(bool)'
debug/mainwindow.o(.text+0x33e):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:67:
undefined reference to `QgsMapCanvas::refresh()'
debug/mainwindow.o(.text+0x600):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:88:
undefined reference to `QgsMapToolPan::QgsMapToolPan(QgsMapCanvas*)'
debug/mainwindow.o(.text+0x658):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:89:
undefined reference to `QgsMapTool::setAction(QAction*)'
debug/mainwindow.o(.text+0x69a):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:90:
undefined reference to `QgsMapToolZoom::QgsMapToolZoom(QgsMapCanvas*, bool)'
debug/mainwindow.o(.text+0x6f1):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:91:
undefined reference to `QgsMapTool::setAction(QAction*)'
debug/mainwindow.o(.text+0x733):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:92:
undefined reference to `QgsMapToolZoom::QgsMapToolZoom(QgsMapCanvas*, bool)'
debug/mainwindow.o(.text+0x801):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:93:
undefined reference to `QgsMapTool::setAction(QAction*)'
debug/mainwindow.o(.text+0x971): In function
`ZN10MainWindowC1EP7QWidget6QFlagsIN2Qt10WindowTypeEE':
D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:57:
undefined reference to `QgsProviderRegistry::instance(QString)'
debug/mainwindow.o(.text+0x9df):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:61:
undefined reference to `QgsMapCanvas::QgsMapCanvas(QWidget*, char const*)'
debug/mainwindow.o(.text+0xa23):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:62:
undefined reference to `QgsMapCanvas::enableAntiAliasing(bool)'
debug/mainwindow.o(.text+0xa39):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:63:
undefined reference to `QgsMapCanvas::useQImageToRender(bool)'
debug/mainwindow.o(.text+0xa9c):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:65:
undefined reference to `QgsMapCanvas::freeze(bool)'
debug/mainwindow.o(.text+0xaca):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:67:
undefined reference to `QgsMapCanvas::refresh()'
debug/mainwindow.o(.text+0xd8c):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:88:
undefined reference to `QgsMapToolPan::QgsMapToolPan(QgsMapCanvas*)'
debug/mainwindow.o(.text+0xde4):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:89:
undefined reference to `QgsMapTool::setAction(QAction*)'
debug/mainwindow.o(.text+0xe26):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:90:
undefined reference to `QgsMapToolZoom::QgsMapToolZoom(QgsMapCanvas*, bool)'
debug/mainwindow.o(.text+0xe7d):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:91:
undefined reference to `QgsMapTool::setAction(QAction*)'
debug/mainwindow.o(.text+0xebf):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:92:
undefined reference to `QgsMapToolZoom::QgsMapToolZoom(QgsMapCanvas*, bool)'
debug/mainwindow.o(.text+0xf8d):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:93:
undefined reference to `QgsMapTool::setAction(QAction*)'
debug/mainwindow.o(.text+0x1554): In function `ZN10MainWindow7panModeEv':
D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:108:
undefined reference to `QgsMapCanvas::setMapTool(QgsMapTool*)'
debug/mainwindow.o(.text+0x1574): In function
`ZN10MainWindow10zoomInModeEv':
D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:113:
undefined reference to `QgsMapCanvas::setMapTool(QgsMapTool*)'
debug/mainwindow.o(.text+0x1594): In function
`ZN10MainWindow11zoomOutModeEv':
D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:117:
undefined reference to `QgsMapCanvas::setMapTool(QgsMapTool*)'
debug/mainwindow.o(.text+0x1700): In function `ZN10MainWindow8addLayerEv':
D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:125:
undefined reference to `QgsVectorLayer::QgsVectorLayer(QString, QString,
QString, bool)'
debug/mainwindow.o(.text+0x1819):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:130:
undefined reference to `QgsVectorLayer::vectorType() const'
debug/mainwindow.o(.text+0x1853):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:130:
undefined reference to
`QgsSingleSymbolRenderer::QgsSingleSymbolRenderer(QGis::VectorType)'
debug/mainwindow.o(.text+0x18c3):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:132:
undefined reference to `QgsVectorLayer::setRenderer(QgsRenderer*)'
debug/mainwindow.o(.text+0x18ce):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:134:
undefined reference to `QgsMapLayer::isValid()'
debug/mainwindow.o(.text+0x1965):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:144:
undefined reference to `QgsMapLayerRegistry::instance()'
debug/mainwindow.o(.text+0x197e):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:144:
undefined reference to `QgsMapLayerRegistry::addMapLayer(QgsMapLayer*,
bool)'
debug/mainwindow.o(.text+0x19cd):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:149:
undefined reference to `QgsMapLayer::extent() const'
debug/mainwindow.o(.text+0x19ef):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:149:
undefined reference to `QgsMapCanvas::setExtent(QgsRect const&)'
debug/mainwindow.o(.text+0x1ad6):D:/sources/QT/Examples_Code/Ex4/2_basic_main_window/mainwindow.cpp:151:
undefined reference to
`QgsMapCanvas::setLayerSet(QList<QgsMapCanvasLayer>&)'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug/2_basic_main_window.exe] Error 1
mingw32-make[1]: Leaving directory
`D:/sources/QT/Examples_Code/Ex4/2_basic_main_window'
mingw32-make: *** [debug] Error 2
Example 1 and 2 give this same error to me. What is a different between
vectorType() and geometryType()? For your info,i'm using QGis 1.0 and run on
Windows platform. Please help me,i'm new to QGis.
Thanks in advance,
Bonar
--
View this message in context: http://n2.nabble.com/HELP%21%21geometryType%28%29-problem%21%21%21-tp2387801p2387801.html
Sent from the qgis-developer mailing list archive at Nabble.com.
More information about the Qgis-developer
mailing list