Original Post
here's the error
Main.hpp is where the WinMain and Messageing loop is
CGameEngine.hpp/cpp is a class that does game stuff
Globals.hpp Holds global variables
This is the top of Main.hpp
This is the top of Globals.hpp
And this is the top of CTileEngine.cpp
So why am I getting linking errors about variables that are declared in global.hpp being declared twice??? and also is this a good way of setting things up??
Thanks in advance
Edited by - Nullio on December 19, 2001 7:38:41 PM
Edited by - Nullio on December 19, 2001 7:40:28 PM
Edited by - Nullio on December 19, 2001 7:42:17 PM
Edited by - Nullio on December 19, 2001 7:44:36 PM
#define WIN32_LEAN_AND_MEAN #define ENGINEMAIN_INCLUDED #ifndef INITGUID #define INITGUID #endif #ifndef WINSTUFF #include <windows.h> #include <windowsx.h> #include <stdio.h> #include <math.h> #define WINSTUFF #endif #include "ddraw.h" #ifndef GLOBALS_INCLUDED #include "Globals.hpp" #endif #include "CGameEngine.hpp" |
#ifndef WINSTUFF #include <windows.h> #include <windowsx.h> #include <stdio.h> #include <math.h> #define WINSTUFF #endif #define GLOBALS_INCLUDED |
#define CGAMEENGINE_INCLUDED
#ifndef GLOBALS_INCLUDED
#include "Globals.hpp"
#endif
#ifndef __DDRAW_INCLUDED__
#include "ddraw.h"
#endif
#include "CGameEngine.hpp"
int CGameEngine::StartDirectDraw(int iWidth, int iHeight, int iBpp) {
.
.
.
}
|