Hallo Zusammen,
hab wie immer Probleme mit VC 2012. Und zwar bekomme ich immer die Fehlermeldung: Fehler 2 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: __thiscall CGame::CGame(void)" (??0CGame@@QAE@XZ)" in Funktion "_SDL_main". C:\Projekte\SDL-game\SDL-game\main.obj SDL-game
Meine Game.h sieht so aus:
|
C-/C++-Quelltext
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef Game
#define Game
#include <iostream>
#include <SDL.h>
using namespace std;
class CGame
{
public:
CGame();
~CGame();
bool Init(const char *title, int xpos, int ypos, int width, int height, int flags);
void Render();
void Update();
void HandleEvents();
void Clean();
// a function to access the private running variable
bool Running() { return m_bRunning; }
private:
SDL_Window *m_pWindow;
SDL_Renderer *m_pRenderer;
bool m_bRunning;
};
#endif /* defined(__Game__) */
|
und in meiner Game-cpp ist eben die Game.h eingebunden. Und in der main.cpp ist auch die Game.h als include eingebunden.
Hat jemand eine Idee, woran das liegen könnte?
EDIT: Hat sich erledigt. Ich hatte den Konstruktor nicht ausgeführt.