×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    4

    QSensor compilation problem

    Hello,
    I'm using NokiaSDK.

    After building the project I get this message "undefined reference to `_imp___ZN10QtMobility7QSensor5startEv'" .. The guess it's something with the project file .. but what ?

    Please help me..

    This is Compile output:
    Code:
    Running build steps for project lenon...
    Configuration unchanged, skipping qmake step.
    Starting: C:/NokiaQtSDK/mingw/bin/mingw32-make.exe -w 
    mingw32-make: Entering directory `C:/Users/lenon/Documents/Quty/lenon-build-simulator' 
    C:/NokiaQtSDK/mingw/bin/mingw32-make -f Makefile.Debug 
    mingw32-make[1]: Entering directory `C:/Users/lenon/Documents/Quty/lenon-build-simulator' 
    linking debug\lenon.exe 
    mingw32-make[1]: Leaving directory `C:/Users/lenon/Documents/Quty/lenon-build-simulator' 
    mingw32-make: Leaving directory `C:/Users/lenon/Documents/Quty/lenon-build-simulator' 
    debug/widget.o: In function `Widget': 
    C:\Users\lenon\Documents\Quty\lenon-build-simulator/../lenon/widget.cpp:21: undefined reference to `_imp___ZN10QtMobility7QSensor5startEv' 
    C:\Users\lenon\Documents\Quty\lenon-build-simulator/../lenon/widget.cpp:21: undefined reference to `_imp___ZN10QtMobility7QSensor5startEv' 
    debug/widget.o: In function `QAccelerometer': 
    c:/NokiaQtSDK/Simulator/QtMobility/mingw/include/qaccelerometer.h:81: undefined reference to `_imp___ZN10QtMobility14QAccelerometer4typeE' 
    c:/NokiaQtSDK/Simulator/QtMobility/mingw/include/qaccelerometer.h:81: undefined reference to `_imp___ZN10QtMobility7QSensorC2ERK10QByteArrayP7QObject' 
    c:/NokiaQtSDK/Simulator/QtMobility/mingw/include/qaccelerometer.h:81: undefined reference to `_imp___ZTVN10QtMobility14QAccelerometerE' 
    collect2: ld returned 1 exit status 
    mingw32-make[1]: *** [debug\lenon.exe] Error 1 
    mingw32-make: *** [debug] Error 2 
    Exited with code 2.
    Error while building project lenon (target: Qt Simulator)
    When executing build step 'Make'

    The project file ".pro"

    Code:
    QT += core gui
    
    TARGET = lenon
    TEMPLATE = app
    
    
    SOURCES += main.cpp\
            widget.cpp
    
    HEADERS  += widget.h
    
    FORMS    += widget.ui
    
    CONFIG += mobility
    MOBILITY = 
    
    symbian {
        TARGET.UID3 = 0xe2ad2782
        TARGET.EPOCSTACKSIZE = 0x14000
        TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }
    And widget.cpp

    Code:
    #include "widget.h"
    #include "ui_widget.h"
    #include <QSensor>
    
    Widget::Widget(QWidget *parent) :
        QWidget(parent),
        ui(new Ui::Widget)
    {
        ui->setupUi(this);
    
        QSensor sensor("QAccelerometer");
        sensor.start();
    
        QSensorReading *reading = sensor.reading();
        qreal x = reading->property("x").value<qreal>();
        qreal y = reading->value(1).value<qreal>();
    }

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

    Re: QSensor compilation problem

    Try to add to a project file
    Code:
    MOBILITY += sensors
    .

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    4

    Re: QSensor compilation problem

    Quote Originally Posted by divanov View Post
    Try to add to a project file
    Code:
    MOBILITY += sensors
    .

    thanks alot, it helped !

Similar Threads

  1. STLPort namespace issue
    By yickhong in forum Open C/C++
    Replies: 0
    Last Post: 2009-04-09, 08:54
  2. SyncML link problem
    By samuel_ in forum Symbian
    Replies: 4
    Last Post: 2009-03-27, 08:02
  3. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  4. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  5. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36

Posting Permissions

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