Hey everyone,
I cannot seem to find where the problem is at. The three files it
is happening in are Video.h, Video.cpp, and Game.h.
Game.h is the core game system class.
Video.h/Video.cpp is an interface layer to control video configuation,
and our engines Video SubSystem and drivers.
It works fine if I #include Video.h one time (In either Video.cpp or Game.cpp),
but if #include it in both I get synthax errors from the compilier:
Game.cpp
Video.cpp
Game.h(27) : error C2143: syntax error : missing ';' before '*'
Game.h(27) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Game.h(27) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
There are other files; however the above is the problem.
Im having trouble finding WHERE and WHY though.
At first I thought there was something with the #includes. That is,
until I noticed this:
class Game {
// Only one instance of the game //
static Game* m_pGame;
// We *Only* get those synthax errors if we declare the following varable
// (using SysVideo), which is declared in Video.h
// Graphics SubSystem //
//SysVideo* m_pkVideo; // error??
char* m_pkVideo; // okay
// etc...
SysVideo is declared in Video.h:
#ifndef EVEH3D_VIDEO_H_INCLUDED_4532656FFCABD56DC87ABA_
# define EVEH3D_VIDEO_H_INCLUDED_4532656FFCABD56DC87ABA_
#include "Game.h"
class SysVideo {
// Video driver. If none, engine will be set to HEL //
Eveh3D::Video::VideoDriver* m_pkVideo;
public:
SysVideo ();
};
#endif //EVEH3D_VIDEO_H_INCLUDED_4532656FFCABD56DC87ABA_
Game.h:
#ifndef EVEH3D_GAME_H_INCLUDED_4532656FFCABD56DC87ABA_
# define EVEH3D_GAME_H_INCLUDED_4532656FFCABD56DC87ABA_
// EvolutionEngine Core library
#pragma comment (lib, "Eveh3D.lib")
#include <Core.h>
#include "Base.h"
#include "Settings.h"
#include "Video.h"
class Game {
// Only one instance of the game //
static Game* m_pGame;
// Graphics SubSystem //
//SysVideo* m_pkVideo;
char* m_pkVideo;
// Game settings //
SettingsManager* m_pkSettings;
// Prepare to start everything //
virtual int Initialize (int argc, char** argv);
protected:
Game ();
public:
virtual ~Game ();
// You got game! :)
static Game* Get ();
// Start game //
virtual int Start (int argc, char** argv);
// Get settings manager //
inline virtual const SettingsManager* GetSettingsManager ();
};
#endif // EVEH3D_GAME_H_INCLUDED_4532656FFCABD56DC87ABA_
Does anyone see anything??
Any help would be appreciated.
Thank you in advance.[smile]