Reputation: 79
The total error message is:
Undefined symbols for architecture x86_64:
"vtable for GameControlCenter", referenced from:
GameControlCenter::GameControlCenter() in gamecontrolcenter.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
The head is:
#ifndef GAMECONTROLCENTER_H
#define GAMECONTROLCENTER_H
#include "gamewindows.h"
#include <QList>
#include <QPair>
#include <QObject>
class GameControlCenter:public QObject
{
Q_OBJECT
public:
GameControlCenter();
The error become When
the GameControlCenter inherit QObject and add macro "Q_OBJECT".
Before this opertaion, these code can run normaly. But I need to add slots function in GameControlCenter head, so I need to inherit QObject.
OS is OS X10.11.2. Qt Creator
Upvotes: 1
Views: 561
Reputation: 79
In my code, I repeat call this head file. So if you have the same question, please check your code whether include same file again.
Upvotes: 2