Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Usage of "QtMobility::" in code gives error "undefined reference ...
Qt 6.11 is out! See what's new in the release blog

Usage of "QtMobility::" in code gives error "undefined reference ...

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 6 Posters 4.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chetanpan
    wrote on last edited by
    #1

    Original title: "usage of "QtMobility::" in code gives error "undefined reference to `_imp___ZN10QtMobility15QContactManagerC1ERK7QStringRK4QMapIS1_S1_EP7QObject' and"

    Can you guess what is wrong in my installation of QtCreator?

    Note that if I remove usage of QtMobility namespace, errors goes away!

    Here is pro file:

    @
    #-------------------------------------------------

    Project created by QtCreator 2011-01-21T20:14:39

    #-------------------------------------------------

    QT += core gui

    TARGET = ContactList
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui

    CONFIG += mobility
    MOBILITY =

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

    [shortened title, please review, the hanging "and..." makes me think you didn't get everything you wanted in this post -mariusg]

    [EDIT: code formatting - please use @-tags, Volker]

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      do you link to the QtMobility libs?
      I don't see so....

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        [quote author="chetanpan" date="1296307744"]Original title: "usage of "QtMobility::" in code gives error "undefined reference to `_imp___ZN10QtMobility15QContactManagerC1ERK7QStringRK4QMapIS1_S1_EP7QObject' and"

        Can you guess what is wrong in my installation of QtCreator?

        Note that if I remove usage of QtMobility namespace, errors goes away!
        [/quote]

        What do you mean by "remove usage of QtMobility namespace"? Can you show us some sample code? As far as I know there is no namespace involved with Qt Mobility.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • N Offline
          N Offline
          ngocketit
          wrote on last edited by
          #4

          Add this to your project file:
          @MOBILITY = contacts@

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            [quote author="Volker" date="1296342360"]As far as I know there is no namespace involved with Qt Mobility.[/quote]

            After reading the docs I must admit that this is wrong. Qt Mobility does use namespaces, sorry for any inconvenience.

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              Why should Qt Creator be wrong when you can not link to some random library? Most likely your project's build system is broken since it does not link to the libraries your code needs.

              1 Reply Last reply
              0
              • C Offline
                C Offline
                chetanpan
                wrote on last edited by
                #7

                Thanks, Adding contacts to MOBILITY worked and I am able to run it on simulator, but now, I have another problem.

                If I try to build same project (which works fine on simulator) for symbian, it does not successfully build with errors stating that QtMobility namespace and classes are not found!

                Do I need to do something else? I noted that C:\NokiaQtSDK\Symbian\SDK\include has QtContacts directory but it does not contain .h files...

                Any help is appreciated.
                [quote author="ngocketit" date="1296344649"]Add this to your project file:
                @MOBILITY = contacts@[/quote]

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  niilier
                  wrote on last edited by
                  #8

                  You might want to try the new Qt SDK 1.1. Technology Preview. It should contain QtMobility 1.1 for Symbian targets. http://labs.qt.nokia.com/2011/01/20/qt-sdk-1-1-technology-preview-released/

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved