خرید بک لینک

Vote count: 0

please can you help me? I just don't know what's wrong with my code. I created a new project in QT and added a new class (gamescene.cpp and gamescene.h), which i included and create a new object (instance) of this new class and it cause this error:

mainwindow.obj:-1: Chyba: LNK2019: unresolved external symbol "public: __cdecl GameScene::GameScene(void)" (??0GameScene@@QEAA@XZ) referenced in function "public: __cdecl MainWindow::MainWindow(class QWidget *)" (??0MainWindow@@QEAA@PEAVQWidget@@@Z)

file mainwindow.cpp:

#include "mainwindow.h"
#include "gamescene.h"
MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent)
{
    gamescene = new GameScene();
}

MainWindow::~MainWindow()
{

}

file mainwindow.h:

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include 

class GameScene;

class MainWindow : public QMainWindow
{
   Q_OBJECT

public:
   MainWindow(QWidget *parent = 0);
   ~MainWindow();
   GameScene *gamescene;
};

#endif // MAINWINDOW_H

file gamescene.cpp:

#include "gamescene.h"

GameScene::GameScene()
{

}

file gamescene.h:

#ifndef GAMESCENE_H
#define GAMESCENE_H


class GameScene
{
public:
   GameScene();
};

#endif // GAMESCENE_H
asked 30 secs ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 3 ارديبهشت 1396 ساعت: 17:44

صفحه بندی