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
[QUOTE]
#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
[/QUOTE]
If I don't put the function "startSatelliteMonitor()" in comment, I have another error
[QUOTE]undefined SatelliteAccess::startSatelliteMonitor()[/QUOTE]
all the code is the same as [url]http://wiki.forum.nokia.com/index.php/Retrieving_satellite_information_in_Qt[/url]
I just put all the method in a class.
Thanks for help.
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.
Re: undefined reference to vtable
I would guess the problem is with your project file.
Re: undefined reference to vtable
I don't know but why the delete of the makefile resolve the problem?
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.