Archived

This topic is now archived and is closed to further replies.

These wonderfull... things

This topic is 5892 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okay, me again =) well, now it seems like when I try to build my stuff I get a load of errors.. It worked perfectly, but all the sudden it dosent want to cooperate with me.. I''m not sure what I''ve done, and I''ve tried to sort it out.. however, this is what I get: -------------------Configuration: Camera3 - Win32 Debug-------------------- Linking... Init.obj : error LNK2005: "void __cdecl draw_string(void *,char const *)" (?draw_string@@YAXPAXPBD@Z) already defined in Camera.obj Init.obj : error LNK2005: "long curtime" (?curtime@@3JA) already defined in Camera.obj Init.obj : error LNK2005: "long last_time" (?last_time@@3JA) already defined in Camera.obj Main.obj : error LNK2005: "void __cdecl draw_string(void *,char const *)" (?draw_string@@YAXPAXPBD@Z) already defined in Camera.obj Main.obj : error LNK2005: "long curtime" (?curtime@@3JA) already defined in Camera.obj Main.obj : error LNK2005: "long last_time" (?last_time@@3JA) already defined in Camera.obj Music.obj : error LNK2005: "void __cdecl draw_string(void *,char const *)" (?draw_string@@YAXPAXPBD@Z) already defined in Camera.obj Music.obj : error LNK2005: "long curtime" (?curtime@@3JA) already defined in Camera.obj Music.obj : error LNK2005: "long last_time" (?last_time@@3JA) already defined in Camera.obj Player.obj : error LNK2005: "void __cdecl draw_string(void *,char const *)" (?draw_string@@YAXPAXPBD@Z) already defined in Camera.obj Player.obj : error LNK2005: "long curtime" (?curtime@@3JA) already defined in Camera.obj Player.obj : error LNK2005: "long last_time" (?last_time@@3JA) already defined in Camera.obj Main.obj : error LNK2001: unresolved external symbol "public: __thiscall CLoad3DS::CLoad3DS(void)" (??0CLoad3DS@@QAE@XZ) Main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CLoad3DS::Import3DS(struct t3DModel *,char *)" (?Import3DS@CLoad3DS@@QAE_NPAUt3DModel@@PAD@Z) Debug/WEngine.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. WEngine.exe - 15 error(s), 0 warning(s) ------ any suggestions would be appreaciated... I''m not sure what the f*** is already defined in the camera.cpp file and the other files... grrr Kenneth Wilhelmsen Download my little game project HERE -------------------------- He who joyfully marches to music in rank and file has already earned my contempt. He has been given a large brain by mistake, since for him the spinal cord would fully suffice. This disgrace to civilization should be done away with at once. Heroism at command, senseless brutality, deplorable love-of-country stance, how violently I hate all this, how despicable and ignoble war is; I would rather be torn to shreds than be a part of so base an action! It is my conviction that killing under the cloak of war is nothing but an act of murder

Share this post


Link to post
Share on other sites
for the "already defined" errors, it sounds like you''ve included an include file in more than one file. The way I solved this was by putting:

  

#ifndef BLAH_H // the first include, this will be undefined

#define BLAH_H 1 // the next time, it will


// .... CODE .... //


#endif



this means that the first time the file is included, the variable will be undefined and so it will run through the file. The second time however, the variable WILL be defined, so the file won''t be run through. Or at least it will be, but only from the #endif onwards.
The other 2 errors basically mean that "CLoad3DS" and "Import3DS" are called in main.cpp, but are undefined i.e. Not known about. You can check a few things:

1. That the functions your calling are implemented (the code is typed) somewhere in your project.

2. That the function name is correct, i.e. Load3DS instead of CLoad3DS

or 3. That the include file which defines, but does not implement CLoad3DS is included in main.cpp.

Keep trying and good luck!

HTH

------------------------------
Baldur K

Share this post


Link to post
Share on other sites