Original Post
Im getting these linker errors when I try to compile my little game engine demo. I recently tried to organize my program into two other files, a .h file and a .cpp file that contained all my functions so that they wouldn''t cludder up the main program. Unfortunately Im getting stuck on these errors. Im going to post the errors but if anyone would be kind enough to look over my code I will email them it. Im really stumped on this one and even my teacher at school can''t seem to figure it out. Here is some of the errors:
func.obj : error LNK2005: "double mapx" (?mapx@@3NA) already defined in Demo.obj
func.obj : error LNK2005: "int ScreenBPP" (?ScreenBPP@@3HA) already defined in Demo.obj
func.obj : error LNK2005: "int ScreenHeight" (?ScreenHeight@@3HA) already defined in Demo.obj
func.obj : error LNK2005: "int ScreenWidth" (?ScreenWidth@@3HA) already defined in Demo.obj
func.obj : error LNK2005: "class CDXTile * ExploTile" (?ExploTile@@3PAVCDXTile@@A) already defined in Demo.obj
func.obj : error LNK2005: "class CDXSprite * Explo" (?Explo@@3PAVCDXSprite@@A) already defined in Demo.obj
All the rest are almost the exact same, except for of course the names of the variables. There is func.h which has all the of function prototypes and other includes and func.cpp which has the actual function code, I moved these out of Demo.cpp, so none of them are in there anymore. Although it says they are already defined in Demo they aren''t in there, that kinda stumps me. Does anyone know the problem?
Thanx,
ViPeR
BTW, yes I am using the CDX wrapper.