×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Nokia Developer Expert
    Join Date
    Mar 2006
    Posts
    6

    Build problems Nokia QT SDK 1.1

    hello,

    I'm experimenting with QT SDK with following example.

    http://doc.qt.nokia.com/qtcreator-2....e-example.html

    It works on simulator and in real device (N97) as expected.

    My problem comes valid when I try to add a new class into project. After many experiments I end up adding simplest possible QObject derived class via Creator wizard "Add new"->c++->c++ class.

    c/p headerfie.

    #ifndef MYTESTCLASS_H
    #define MYTESTCLASS_H

    #include <QObject>

    class MyTestClass : public QObject
    {
    Q_OBJECT
    public:
    explicit MyTestClass(QObject *parent = 0);

    signals:

    public slots:

    };

    #endif // MYTESTCLASS_H

    As soon I declare this class in my existing BatteryIndicator class, Symbian build starts to fail in "rebuild all"
    (simulator build works)

    ..
    #include "mytestclass.h"

    ..
    private:
    MyTestClass testclass;

    ....

    /NokiaQTSDK/Omat/BatteryIndicator/batteryindicator.cpp:6: error: undefined reference to `MyTestClass::MyTestClass(QObject*)'
    /NokiaQTSDK/Omat/BatteryIndicator/batteryindicator.cpp:6: error: undefined reference to `MyTestClass::MyTestClass(QObject*)'
    /NokiaQTSDK/Symbian/SDK/EPOC32/BUILD/NokiaQTSDK/Omat/BatteryIndicator/BATTERYINDICATOR_0XEB0275F9/GCCE/UDEB/batteryindicator.o:: In function `~MyTestClass':
    /NokiaQTSDK/Omat/BatteryIndicator/mytestclass.h:7: error: undefined reference to `vtable for MyTestClass'

    I found a post http://bugreports.qt.nokia.com/browse/QTSDK-98
    that steps I did already.

    What I might miss here, I noticed that there have been similar kind of threads on this forum but couldnt find a solution for my case though

    I appreciate any help.

    thanks

    ari

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2006
    Posts
    6

    Re: Build problems Nokia QT SDK 1.1

    Should be SDK 1.0

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

    Re: Build problems Nokia QT SDK 1.1

    Make sure that you have something like this in project file:
    Code:
    HEADERS += mytestclass.h

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2006
    Posts
    6

    Re: Build problems Nokia QT SDK 1.1

    Quote Originally Posted by divanov View Post
    Make sure that you have something like this in project file:
    Code:
    HEADERS += mytestclass.h
    Wizard have added that on my behalf, whole pro-file looks like this:

    QT += core gui


    TARGET = BatteryIndicator
    TEMPLATE = app


    SOURCES += main.cpp\
    batteryindicator.cpp \
    mytestclass.cpp

    HEADERS += batteryindicator.h \
    mytestclass.h

    FORMS += batteryindicator.ui

    CONFIG += mobility

    MOBILITY = systeminfo

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

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

    Re: Build problems Nokia QT SDK 1.1

    Then clean the project and rebuild it again.
    In console it's done with a commands
    Code:
    qmake distclean
    qmake
    make
    Should be possible from Qt Creator also.

  6. #6
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Build problems Nokia QT SDK 1.1

    It looks like it's not the header that's missing but rather the module.

    SOURCES += mytestclass.cpp

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

    Re: Build problems Nokia QT SDK 1.1

    Quote Originally Posted by danhicksbyron View Post
    It looks like it's not the header that's missing but rather the module.

    SOURCES += mytestclass.cpp
    It is there as well.

  8. #8
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Build problems Nokia QT SDK 1.1

    That said, it's the linker step that's objecting. Does your cpp file define MyTestClass::MyTestClass(QObject*)?

  9. #9
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Build problems Nokia QT SDK 1.1

    You say
    (simulator build works)
    Have you tried "cleaning" the device build?

  10. #10
    Nokia Developer Expert
    Join Date
    Mar 2006
    Posts
    6

    Re: Build problems Nokia QT SDK 1.1

    Hello,

    Thanks for getting me on right track. I needed to run qmake separately each time I added new class. When I created initial project containing only one class qmake is run by the Creator by default but later this does not seem happen. Qmake needs to be run either via command prompt or via build-menu. Cleaning (all) has no effect, i.e it does not force Creator for running qmake but qmake needs to run explicitly. Simulator build seems working diffrently requiring no manual qmake in this phase.

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

    Re: Build problems Nokia QT SDK 1.1

    Quote Originally Posted by alehtola View Post
    I needed to run qmake separately each time I added new class.
    In principle this is not true Makefile checks for timestamp of .pro file and run qmake in case .pro file is newer than Makefile.

    Quote Originally Posted by alehtola View Post
    Cleaning (all) has no effect, i.e it does not force Creator for running qmake but qmake needs to run explicitly.
    Note that there is a difference between make clean and make distclean, the former doesn't remove Makefile.

  12. #12
    Nokia Developer Expert
    Join Date
    Mar 2006
    Posts
    6

    Re: Build problems Nokia QT SDK 1.1

    I double checked this by new project and this is really a case. In my opinion this is a kind of bug, IDE should handle this by default.

  13. #13
    Registered User
    Join Date
    Mar 2010
    Posts
    49

    Re: Build problems Nokia QT SDK 1.1

    I have also faced similar problems. From time to time I have to run qmake manually after Qt Creator just says something like "configuration unchanged, skipping qmake step".

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

    Re: Build problems Nokia QT SDK 1.1

    Do you have any clock skew?

  15. #15
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Build problems Nokia QT SDK 1.1

    Quote Originally Posted by alehtola View Post
    I double checked this by new project and this is really a case. In my opinion this is a kind of bug, IDE should handle this by default.
    I've seen this occasionally, with both Carbide and Qt Creator, but it never was consistent (though it seems to happen more on some projects than others).

Similar Threads

  1. 2 problems in Nokia Qt SDK
    By l_xin1983 in forum [Archived] Qt Mobility Project
    Replies: 2
    Last Post: 2010-07-19, 16:44
  2. Nokia Qt SDK for Mac -- build fails in Qt Creator
    By ovjo12 in forum [Archived] Qt SDKs and Tools
    Replies: 4
    Last Post: 2010-07-19, 15:29
  3. Nokia Qt SDK installation problems
    By svdwal in forum [Archived] Qt SDKs and Tools
    Replies: 3
    Last Post: 2010-06-02, 23:18
  4. Replies: 1
    Last Post: 2010-05-13, 07:46
  5. Qt SDK/Version path problems with Nokia Qt SDK beta on Windows 7
    By Evolius in forum [Archived] Qt SDKs and Tools
    Replies: 3
    Last Post: 2010-05-10, 19:46

Posting Permissions

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