Page 1 of 1

Small problem

Posted: Wed Jul 13, 2005 2:04 pm
by Ultra The Vampire
i know this might be a stupid little small problem but i can't find any way to fix it.

here is my source http://www.fullblowndesigns.com/source.rar

Code: Select all

------ Build started: Project: ICE_Demo, Configuration: Debug Win32 ------

Linking...
ICE_DemoEngine.obj : error LNK2005: "class NPC NPC2" (?NPC2@@3VNPC@@A) already defined in gs_DemoFakeGame.obj
main.obj : error LNK2005: "class NPC NPC2" (?NPC2@@3VNPC@@A) already defined in gs_DemoFakeGame.obj
gs_DemoFakeGame.obj : error LNK2019: unresolved external symbol "public: __thiscall NPC::NPC(void)" (??0NPC@@QAE@XZ) referenced in function _$E1
ICE_DemoEngine.obj : error LNK2001: unresolved external symbol "public: __thiscall NPC::NPC(void)" (??0NPC@@QAE@XZ)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall NPC::NPC(void)" (??0NPC@@QAE@XZ)
../../bin/ICE_Demo.exe : fatal error LNK1120: 1 unresolved externals
any idea whats the problem here?
oh yeah, i stripped out the dependencies and data files to make the source download lighter, in all the download would have been 33.1MB not it's only 1.8MB

Posted: Wed Jul 13, 2005 7:34 pm
by Guest
What compiler are you using?

Posted: Wed Jul 13, 2005 11:35 pm
by Frobozz
Anonymous wrote:What compiler are you using?
He's using Visual Studio. As to what version, I'd say .NET. :wink:

Posted: Thu Jul 14, 2005 12:16 pm
by Ultra The Vampire
correct.
Visual studio .NET 2003

Posted: Thu Jul 14, 2005 5:53 pm
by Guest
I only have Dev C++. :(

the example compiles with no trouble.

Posted: Fri Jul 15, 2005 3:44 pm
by Ultra The Vampire
maybe i should switch to dev

Posted: Fri Jul 15, 2005 3:56 pm
by Fred
Wild shot in the dark - do you have two include files with exactly the same #ifndef?

For example:

#ifndef __SOURCE_FILE_H
#define __SOURCE_FILE_H

#endif

And do you have these in every header file you have created?