[Qgis-developer] make error (windows)

Jack R lynx21.12.12 at gmail.com
Sun Feb 22 17:06:01 EST 2009


On Sunday 22 February 2009 21:46:39 Florian Hillen wrote:
> Hi list,
>
> I customize the first tutorial of Tim Sotton's blog so that it 
almost
> works under windows. I fixed every problem during cmake 
(a big problem
> were the paths with their "\" and "/"), but now I am stucked in 
the make
> process, which throws a huge list of errors which I can't 
solve on my own.
> I already checked the paths and the dependings - they seem 
to be correct.
> I hope that anyone of you can help me with that!?
>
> Best regards,
> Florian
>
>
>
> [100%] Building CXX object CMakeFiles/timtut1.dir/main.obj
> Linking CXX executable timtut1.exe
> CMakeFiles/timtut1.dir/main.obj(.text+0x18b):main.cpp: 
undefined reference
> to `_
> imp___ZN14QgsApplicationC1ERiPPcb'
> CMakeFiles/timtut1.dir/main.obj(.text+0x232):main.cpp: 
undefined reference
> to `_
> imp___ZN19QgsProviderRegistry8instanceE7QString'
> CMakeFiles/timtut1.dir/main.obj(.text+0x348):main.cpp: 
undefined reference
> to `_
> imp___ZN14QgsVectorLayerC1E7QStringS0_S0_b'
> CMakeFiles/timtut1.dir/main.obj(.text+0x473):main.cpp: 
undefined reference
> to `_
> imp___ZNK14QgsVectorLayer12geometryTypeEv'
> CMakeFiles/timtut1.dir/main.obj(.text+0x4a5):main.cpp: 
undefined reference
> to `_
> 
imp___ZN23QgsSingleSymbolRendererC1EN4QGis12GeometryTypeE'
> CMakeFiles/timtut1.dir/main.obj(.text+0x514):main.cpp: 
undefined reference
> to `_
> 
imp___ZN14QgsVectorLayer11setRendererEP11QgsRenderer'
> CMakeFiles/timtut1.dir/main.obj(.text+0x52b):main.cpp: 
undefined reference
> to `_
> imp___ZN11QgsMapLayer7isValidEv'
> CMakeFiles/timtut1.dir/main.obj(.text+0x55e):main.cpp: 
undefined reference
> to `_
> imp___ZN19QgsMapLayerRegistry8instanceEv'
> CMakeFiles/timtut1.dir/main.obj(.text+0x581):main.cpp: 
undefined reference
> to `_
> 
imp___ZN19QgsMapLayerRegistry11addMapLayerEP11QgsMapLayerb'
> CMakeFiles/timtut1.dir/main.obj(.text+0x5ed):main.cpp: 
undefined reference
> to `_
> imp___ZN12QgsMapCanvasC1EP7QWidgetPKc'
> CMakeFiles/timtut1.dir/main.obj(.text+0x647):main.cpp: 
undefined reference
> to `_
> imp___ZNK11QgsMapLayer6extentEv'
> CMakeFiles/timtut1.dir/main.obj(.text+0x66e):main.cpp: 
undefined reference
> to `_
> imp___ZN12QgsMapCanvas9setExtentERK12QgsRectangle'
> CMakeFiles/timtut1.dir/main.obj(.text+0x792):main.cpp: 
undefined reference
> to `_
> imp___ZN12QgsMapCanvas18enableAntiAliasingEb'
> CMakeFiles/timtut1.dir/main.obj(.text+0x807):main.cpp: 
undefined reference
> to `_
> imp___ZN12QgsMapCanvas6freezeEb'
> CMakeFiles/timtut1.dir/main.obj(.text+0x81e):main.cpp: 
undefined reference
> to `_
> 
imp___ZN12QgsMapCanvas11setLayerSetER5QListI17QgsMapCanvasLayerE'
> CMakeFiles/timtut1.dir/main.obj(.text+0x84e):main.cpp: 
undefined reference
> to `_
> imp___ZN12QgsMapCanvas7refreshEv'
> CMakeFiles/timtut1.dir/main.obj(.text+0x8db):main.cpp: 
undefined reference
> to `Q
> gsApplication::~QgsApplication()'
> CMakeFiles/timtut1.dir/main.obj(.text+0x9ee):main.cpp: 
undefined reference
> to `Q
> gsApplication::~QgsApplication()'
> collect2: ld returned 1 exit status
> mingw32-make[2]: *** [timtut1.exe] Error 1
> mingw32-make[1]: *** [CMakeFiles/timtut1.dir/all] Error 2
> mingw32-make: *** [all] Error 2
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
Hi, Hillen.

It seems you should add qgis_core and qgis_gui libraries to 
CMakeLists.txt, try this:
TARGET_LINK_LIBRARIES(georefplugin
    qgis_core
    qgis_gui
)
or
TARGET_LINK_LIBRARIES(timtut1
  ${QGIS_CORE_LIBRARY} 
  ${QGIS_GUI_LIBRARY}
)


More information about the Qgis-developer mailing list