I am having a problem linking that I can't seem to resolve....
There are 3 source files:
main.cpp, map.cpp, terrain.cpp
There are 3 header files:
map.h, terrain.h, vectordtp.h
terrain.h looks like:
terrain.cpp includes terrain.h and defines all functions in from the classes.
...some constants defined....
friend class TERRAIN_DTP;
map.h looks like such:
map.cpp includes map.h and defines all functions from the class.
vectordtp.h is a simple header file that defines my own vector and matrix classes....with both the declaration and definitions in the same file (the function definitions are encapsulated inside the class declaration).
main.cpp looks like such:
This is the error I am receiving:
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")
bool MessageLoop ( SDL_Event &event );
int main(int argc, char **argv)
terrain.obj : error LNK2005: "class TERRAIN_MANAGER_DTP DefaultTileManager" (?DefaultTileManager@@3VTERRAIN_MANAGER_DTP@@A) already defined in map.obj
I have tried moving around some include statements and such...but I can't seem to resolve this linking problem. Any ideas?