Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor Fillinger's Avatar
    Join Date
    Dec 2009
    Posts
    71
    h,

    I have a problem in the compilation, it says "undefined reference to vtable".

    When I click on the error that point the constructor of my Class.

    here is the code
    #ifndef SATELLITEACCESS_H
    #define SATELLITEACCESS_H
    #include <QtCore>
    #include<QDebug>
    #include <qgeosatelliteinfo.h>
    #include <qgeosatelliteinfosource.h>

    // Use the QtMobility namespace
    using namespace QtMobility;

    class SatelliteAccess : public QObject
    {

    Q_OBJECT
    public:
    SatelliteAccess(QObject *parent = 0): QObject(parent)
    {
    //startSatelliteMonitor();
    }



    private slots:
    /**
    * Called when the number of satellites in use is updated.
    */
    void satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &satellites);
    /**
    * Called when the number of satellites in view is updated.
    */
    void satellitesInViewUpdated(
    const QList<QGeoSatelliteInfo> &satellites);

    signals :
    void SatellitesUsedUpdate(QList<QGeoSatelliteInfo> info );
    void SatelliteViewUpdate(QList<QGeoSatelliteInfo> info);

    private:
    QGeoSatelliteInfoSource *satelliteInfoSource;

    void startSatelliteMonitor();

    };

    #endif // SATELLITEACCESS_H
    If I don't put the function "startSatelliteMonitor()" in comment, I have another error
    undefined SatelliteAccess::startSatelliteMonitor()
    all the code is the same as http://wiki.forum.nokia.com/index.ph...ormation_in_Qt
    I just put all the method in a class.


    Thanks for help.

  2. #2
    Regular Contributor Fillinger's Avatar
    Join Date
    Dec 2009
    Posts
    71
    I found a solution, I don't know if it is good but here it is :

    I delete the makefile and build again the project and all it's ok.

    I use QtCreator 2.0. rc1.

    Hope this help others guys.

  3. #3
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    I would guess the problem is with your project file.

  4. #4
    Regular Contributor Fillinger's Avatar
    Join Date
    Dec 2009
    Posts
    71
    I don't know but why the delete of the makefile resolve the problem?

  5. #5
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    qmake is famous for not rebuilding Makefiles when switching platforms, thus you may have Makefile not matching to your current target.

Similar Threads

  1. Undefined reference...
    By Carthrat in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2010-07-16, 08:26
  2. Undefined reference to E32Main
    By damsku in forum Symbian C++
    Replies: 4
    Last Post: 2009-09-28, 22:10
  3. GCCE Undefined reference
    By jllop in forum Open C/C++
    Replies: 4
    Last Post: 2009-09-18, 14:18
  4. Undefined reference...
    By parikhnirav.aits in forum Symbian C++
    Replies: 9
    Last Post: 2008-08-25, 20:08
  5. Undefined reference to NewL
    By bballbeng in forum Symbian C++
    Replies: 5
    Last Post: 2007-01-07, 12:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved