×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    May 2010
    Location
    Finland
    Posts
    19

    Question undefined reference to 'QtMobility::QGeoServiceProvider::QGeoServiceProvider(QString

    Hello so im trying to start development using Qt Mobility 1.1 in combination with the latest Nokia Qt SDK.

    So heres what i did, i followed this tutorial to set up the environment with Qt 4.7.1:
    http://labs.qt.nokia.com/2010/12/12/...symbian-today/

    After i was done with that i downloaded Qt Mobility 1.1 for symbian: qt-mobility-symbian-opensource-1.1.0.zip

    and followed the instructions in the INSTALL.symbian:

    Installation steps of Qt Mobility 1.1.0 for Symbian (for S60 3.1, 3.2 & 5.0 and Symbian SDKs)
    -----------------------------------------------------------------------------------

    The Mobility project information can be found at http://qt.nokia.com/developer/new-qt-apis

    Prerequisites
    -------------
    - install Qt 4.7.0 for Symbian (first you need to have Symbian SDK(s) in place)
    - Instructions available in Qt documentation: http://doc.qt.nokia.com/4.7-snapshot...l-symbian.html

    - ensure your PATH environment variable includes Qt 4.7 for Symbian SDKs bin folder. It's recommended to have it in the beginning of the PATH as the first make command that is found is used.


    Installing Qt Mobility 1.1.0 for Symbian (for S60 3.1, 3.2 & 5.0 and Symbian SDKs)
    ------------------------------------------------------------------------

    - Once you have downloaded the Qt Mobility 1.1.0 Symbian package, unzip the package

    The Symbian package is identical to the source package, with the following additions:

    INSTALL.symbian
    qt-mobility-symbian-1.1.0-epoc32-3.1.zip
    qt-mobility-symbian-1.1.0-epoc32-3.2.zip
    qt-mobility-symbian-1.1.0-epoc32-5.0.zip
    qt-mobility-symbian-1.1.0-epoc32-symbian.zip
    qt-mobility-symbian-1.1.0-s60.sis
    qt-mobility-symbian-1.1.0-symbian.sis

    - Installing the mobility libraries to your Symbian SDK happens by extracting the
    'qt-mobility-1.1.0-epoc32-<SYMBIAN_SDK>.zip' file to your Symbian SDK.
    - First copy the zip file to your Symbian SDK next to \epoc32 folder, f.ex to C:\Symbian\9.4\S60_5th_Edition_SDK_v1.0_2
    - extract the file
    - Note that you need to repeat this step for all the Symbian SDKs you want to develop with Mobility APIs.

    - Enabling Mobility APIs to your device (Symbian 3rd Edition FP1 or newer, in case unsure see http://www.forum.nokia.com/devices/) :
    - Prerequisite : Qt 4.7.0 for Symbian is installed. For Symbian Qt 4.7.0 installation package see: http://labs.qt.nokia.com/2010/10/18/...ion-available/
    - install the 'qt-mobility-symbian-1.1.0-s60.sis' or 'qt-mobility-symbian-1.1.0-symbian.sis' file to device. You can do this, for example, via bluetooth or through Nokia Ovi Suite (recommended)

    - Copy the <QTMOBILITYDIR>/features/mobility.prf.template file to QTDIR/mkspecs/features/mobility.prf
    - The relevant Qt directory can be obtained by running 'qmake -v' within the build environment.


    The above steps create a working environment for new projects wanting to use the QtMobility libraries.

    Examples:

    - build an example with your device connected to Ovi suite, go to examples

    * cd examples
    * qmake [example].pro
    * make release-gcce
    * createpackage -i [example]_template.pkg release-gcce

    The createpackage command creates a self signed symbian installer package. The -i parameter in createpackage command installs the example to your device connected to Nokia Ovi Suite.


    Notes on examples in Qt Mobility
    --------------------------------

    The Mobility project information can be found at http://qt.nokia.com/developer/new-qt-apis

    The Mobility release contains an initial set of simple examples. We will be adding more demo applications over time, so look for the updates for example by joining the mailing list at http://lists.trolltech.com/mailman/l...ility-feedback. If you have questions about the examples, about using the APIs or want to provide us input you can also do it via the just opened Qt Mobility discussion forum in http://discussion.forum.nokia.com/fo...play.php?f=232

    How to sign the packages that can be selfsigned? Easy, use createpackage as demonstrated in the installation instructions.
    What about the ones that require heavier signing? See http://www.forum.nokia.com/testing or http://developer.symbian.org/wiki/in...Symbian_Signed

    In case you have anything to ask or run into issues feel free to contact us f.ex through discussion board available in http://discussion.forum.nokia.com/fo...play.php?f=232

    Stay tuned for more exciting news on the mobility front!
    so i basically copied the zip file named "qt-mobility-symbian-1.1.0-epoc32-5.0.zip" to the newly created SDK folder "C:\NokiaQtSDK\Symbian\SDK-qt-4.7.1" and extracted it and allowed it to replace old content.

    After this i took the mobility.prf file from the mobility zip package and copy/replaced it into "C:\NokiaQtSDK\Symbian\SDK-qt-4.7.1\qt\mkspecs\features"

    Now according to the tutorials i should have successfully set up the SDK for building Qt 4.7 apps in combination with mobility 1.1 for Symbian _devices_

    however when i tried building a simple small app to test out the new map functionality in the Location API of mobility i got lots of errors

    i had a few people test out the application and they somehow managed to compile it succesfully, the test project can be downloaded from www.kokonniemi.fi/test.zip the zip file also contains the compile output (compile output.txt) containing the errors like:
    undefined reference to 'QtMobility::QGeoServiceProvider::QGeoServiceProvider(QString const&,QMap<QString,QVariant> const&)'

    here is a screenshot of my environment, and in the back you can see the errors its throwing when trying to build for symbian:


    and heres the code thats causing the errors:
    Code:
        QGeoServiceProvider serviceProvider("nokia");
    QGeoMappingManager *manager = serviceProvider.mappingManager();
    QGraphicsGeoMap *geoMap = new QGraphicsGeoMap(manager);
    I hope someone has any clue on what is going on here.

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: undefined reference to 'QtMobility::QGeoServiceProvider::QGeoServiceProvider(QStr

    Do you have
    CONFIG += mobility
    MOBILITY += location
    in the project file?

  3. #3
    Registered User
    Join Date
    May 2010
    Location
    Finland
    Posts
    19

    Re: undefined reference to 'QtMobility::QGeoServiceProvider::QGeoServiceProvider(QStr

    #-------------------------------------------------
    #
    # Project created by QtCreator 2011-01-19T13:15:57
    #
    #-------------------------------------------------

    QT += core gui

    TARGET = test
    TEMPLATE = app


    SOURCES += main.cpp\
    mainwindow.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui

    CONFIG += mobility
    MOBILITY = location

    symbian {
    TARGET.UID3 = 0xe7c37809
    # TARGET.CAPABILITY +=
    TARGET.EPOCSTACKSIZE = 0x14000
    TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }

  4. #4
    Nokia Developer Expert
    Join Date
    Dec 2009
    Posts
    81

    Re: undefined reference to 'QtMobility::QGeoServiceProvider::QGeoServiceProvider(QStr

    Are you using QTM_USE_NAMESPACE in your code (as per http://doc.qt.nokia.com/qtmobility-1...ckstart.html)?

  5. #5
    Registered User
    Join Date
    May 2010
    Location
    Finland
    Posts
    19

    Re: undefined reference to 'QtMobility::QGeoServiceProvider::QGeoServiceProvider(QStr

    I was using that yes, i've built a few applications using Qt Mobility before so i know how it should work, it turned out that i got mobility 1.1 working together with Qt 4.6.3 that came with Nokia Qt SDK, i extracted "qt-mobility-symbian-1.1.0-epoc32-5.0.zip" inside "C:\NokiaQtSDK\Symbian\SDK" instead of the newly created "C:\NokiaQtSDK\Symbian\SDK-qt-4.7.1" folder and in the project settings changed the build version to the one that came with the SDK ("C:\NokiaQtSDK\Symbian\SDK") and i was able to build the map examples and deploy them to device without any problems, except that its not using Qt 4.7

    i did notice that when trying to build using 4.7 the compile output had lines like this:
    "WARNING: \Qt\test\TEST_EXE.MMP(55) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK-qt-4.7.1\epoc32\include\platform\mw\" not found"

    i have no clue why it was even looking for a folder like that, since i have a fresh installation of Windows and a fresh installation of the SDK and have done nothing except what i mentioned in my post.

  6. #6
    Nokia Developer Expert
    Join Date
    Dec 2009
    Posts
    81

    Re: undefined reference to 'QtMobility::QGeoServiceProvider::QGeoServiceProvider(QStr

    From what I can gather it looks for a few folders that may or may not exist, in an attempt to cover the directory layours a variey of possible SDK versions. So not finding the path isn't necessarily an error.

  7. #7
    Registered User
    Join Date
    May 2010
    Location
    Finland
    Posts
    19

    Re: undefined reference to 'QtMobility::QGeoServiceProvider::QGeoServiceProvider(QStr

    Ok, Nokia fixed this one for me big time, too bad they didn't release Qt SDK 1.1 TP yesterday

  8. #8
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: undefined reference to 'QtMobility::QGeoServiceProvider::QGeoServiceProvider(QStr

    The most likely your SDK was broken due to unsuccessful installation and installing Qt SDK 1.1 just has fixed the issue.

Similar Threads

  1. undefined reference to `QtMobility::QSensorFilter::~QSensorFilter()'???
    By TooTough in forum [Archived] Qt Mobility Project
    Replies: 2
    Last Post: 2010-11-11, 01:32
  2. Undefined reference to 'QtMobility::QMessageAccountFilter::QMessageAccountFilter()
    By ankhansen in forum [Archived] Qt Mobility Project
    Replies: 1
    Last Post: 2010-11-05, 07:40
  3. Undefined symbol: '__declspec(dllimport) QtMobility ?
    By damodharan in forum [Archived] Qt Mobility Project
    Replies: 3
    Last Post: 2010-09-27, 11:56
  4. Undefined reference...
    By Carthrat in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2010-07-16, 08:26
  5. undefined reference to QtMobility
    By Guilo19 in forum [Archived] Qt SDKs and Tools
    Replies: 4
    Last Post: 2010-06-24, 10:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •