Usage of "QtMobility::" in code gives error "undefined reference ...
-
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 = appSOURCES += main.cpp
mainwindow.cppHEADERS += 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]
-
[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.
-
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.
-
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] -
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/