×

Discussion Board

Results 1 to 5 of 5

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    undefined reference to vtable

    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
    Join Date
    Dec 2009
    Posts
    71

    Re: undefined reference to vtable

    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
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: undefined reference to vtable

    I would guess the problem is with your project file.

  4. #4
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: undefined reference to vtable

    I don't know but why the delete of the makefile resolve the problem?

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

    Re: undefined reference to vtable

    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
    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
    Replies: 9
    Last Post: 2008-08-25, 20:08
  5. Undefined reference to NewL
    By bballbeng in forum Symbian
    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
  •  
×