Compile Error: undefined reference to `QtMobility::header file'



  • I've got an issue it seems with Qt Mobility. My program works correctly (compiles, builds, then runs) on the simulator, but as soon as I try to run my program on the maemo5 device (nokia n900), I get this massive list of undefined references seen below (this is only about half the errors, 309 total). My guess, from the errors below is that all the functions within the header files cannot be found in their corresponding source files.

    From the line in the compiler output shown in bold, am I understanding correctly that these source files should be in the form of the .prl or .dll files found in the libs folder? If that is the case, and my first guess was also right, how would I go about correcting the issue?

    Thanks to anyone who looks into this, and please let me know of any other information you might need/want to help troubleshoot this.

    g++ -Wl,-rpath-link,/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,-rpath,C:/usr/lib -o mobilityIntegrated obj/mapswidget.o obj/main.o obj/marker.o obj/mainwindow.o obj/searchdialog.o obj/markerdialog.o obj/navigatedialog.o obj/navigator.o obj/moc_mapswidget.o obj/moc_marker.o obj/moc_mainwindow.o obj/moc_searchdialog.o obj/moc_markerdialog.o obj/moc_navigatedialog.o obj/moc_navigator.o obj/qrc_mapsdemo.o -LC:/QtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/lib -L/usr/lib -lQtBearer -lQtLocation -lQtGui -L/usr/X11R6/lib -lQtNetwork -lQtDBus -lQtXml -lQtCore -lpthread
    make: Leaving directory /c/Users/Ryan/Qt/mobilityIntegrated' obj/mapswidget.o: In functionMapsWidget::setMyHome(QtMobility::QGeoAddress, QtMobility::QGeoCoordinate, bool)':
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:472: undefined reference to QtMobility::QGeoAddress::QGeoAddress(QtMobility::QGeoAddress const&)' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:472: undefined reference toQtMobility::QGeoAddress::~QGeoAddress()'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:472: undefined reference to QtMobility::QGeoAddress::~QGeoAddress()' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:474: undefined reference toQtMobility::QGraphicsGeoMap::setCenter(QtMobility::QGeoCoordinate const&)'
    obj/mapswidget.o: In function MapsWidget::setMyLocation(QtMobility::QGeoCoordinate, bool)': C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:466: undefined reference toQtMobility::QGraphicsGeoMap::setCenter(QtMobility::QGeoCoordinate const&)'
    obj/mapswidget.o: In function ZoomButtonItem::mouseReleaseEvent(QGraphicsSceneMouseEvent*)': C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:296: undefined reference toQtMobility::QGraphicsGeoMap::zoomLevel() const'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:296: undefined reference to QtMobility::QGraphicsGeoMap::setZoomLevel(float)' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:298: undefined reference toQtMobility::QGraphicsGeoMap::zoomLevel() const'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:298: undefined reference to QtMobility::QGraphicsGeoMap::setZoomLevel(float)' obj/mapswidget.o: In functionGeoMap::keyPressEvent(QKeyEvent*)':
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:165: undefined reference to QtMobility::QGraphicsGeoMap::screenPositionToCoordinate(QPointF) const' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:174: undefined reference toQtMobility::QGraphicsGeoMap::screenPositionToCoordinate(QPointF) const'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:183: undefined reference to QtMobility::QGraphicsGeoMap::screenPositionToCoordinate(QPointF) const' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:192: undefined reference toQtMobility::QGraphicsGeoMap::screenPositionToCoordinate(QPointF) const'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:199: undefined reference to QtMobility::QGraphicsGeoMap::zoomLevel() const' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:199: undefined reference toQtMobility::QGraphicsGeoMap::minimumZoomLevel() const'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:200: undefined reference to QtMobility::QGraphicsGeoMap::zoomLevel() const' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:200: undefined reference toQtMobility::QGraphicsGeoMap::setZoomLevel(float)'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:204: undefined reference to QtMobility::QGraphicsGeoMap::zoomLevel() const' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:204: undefined reference toQtMobility::QGraphicsGeoMap::maximumZoomLevel() const'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:205: undefined reference to QtMobility::QGraphicsGeoMap::zoomLevel() const' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:205: undefined reference toQtMobility::QGraphicsGeoMap::setZoomLevel(float)'
    obj/mapswidget.o: In function GeoMap::wheelEvent(QGraphicsSceneWheelEvent*)': C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:139: undefined reference toQtMobility::QGraphicsGeoMap::pan(int, int)'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:141: undefined reference to QtMobility::QGraphicsGeoMap::zoomLevel() const' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:141: undefined reference toQtMobility::QGraphicsGeoMap::maximumZoomLevel() const'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:142: undefined reference to QtMobility::QGraphicsGeoMap::zoomLevel() const' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:142: undefined reference toQtMobility::QGraphicsGeoMap::setZoomLevel(float)'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:145: undefined reference to QtMobility::QGraphicsGeoMap::zoomLevel() const' C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:145: undefined reference toQtMobility::QGraphicsGeoMap::minimumZoomLevel() const'
    C:\Users\Ryan\Qt\mobilityIntegrated/mapswidget.cpp:146: undefined reference to `QtMobility::QGraphicsGeoMap::zoomLevel() const'


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.