
September 20th, 2006, 07:08 AM
|
|
Contributing User
|
|
Join Date: Aug 2006
Posts: 407
Time spent in forums: 3 Days 3 h 19 m 11 sec
Reputation Power: 3
|
|
|
Linking Problem in VC++
Hi,
I'm making a game using C++(I'm making you know the locations, story, where is who, now, and I'll put some graphs -DirectX- later). I've made some classes and when I compiled the whole project it says no errors. But when I try to build it, it shows that errors:
Code:
--------------------Configuration: player - Win32 Debug--------------------
Linking...
player.obj : error LNK2005: "public: static class work * __cdecl work::Instance(void)" (?Instance@work@@SAPAV1@XZ) already defined in owned_states.obj
player.obj : error LNK2005: "public: virtual void __thiscall work::Enter(class player *)" (?Enter@work@@UAEXPAVplayer@@@Z) already defined in owned_states.obj
player.obj : error LNK2005: "public: virtual void __thiscall work::Execute(class player *)" (?Execute@work@@UAEXPAVplayer@@@Z) already defined in owned_states.obj
player.obj : error LNK2005: "public: virtual void __thiscall work::Exit(class player *)" (?Exit@work@@UAEXPAVplayer@@@Z) already defined in owned_states.obj
player.obj : error LNK2005: "public: static class sleep * __cdecl sleep::Instance(void)" (?Instance@sleep@@SAPAV1@XZ) already defined in owned_states.obj
player.obj : error LNK2005: "public: virtual void __thiscall sleep::Enter(class player *)" (?Enter@sleep@@UAEXPAVplayer@@@Z) already defined in owned_states.obj
player.obj : error LNK2005: "public: virtual void __thiscall sleep::Execute(class player *)" (?Execute@sleep@@UAEXPAVplayer@@@Z) already defined in owned_states.obj
player.obj : error LNK2005: "public: virtual void __thiscall sleep::Exit(class player *)" (?Exit@sleep@@UAEXPAVplayer@@@Z) already defined in owned_states.obj
Debug/player.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
player.exe - 9 error(s), 0 warning(s)
Any help would be appreciated!!
Thanks in advance!!
Costas
|