Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Compile error
Compile error [message #114386] Mon, 13 September 2004 13:01 Go to next message
Hammer_FIST is currently offline  Hammer_FIST
Messages: 17
Registered: September 2004
Karma: 0
Recruit
i keep getting a compile error with ssaow.... can anyone help please?
dllmain.obj : error LNK2005: "void __cdecl ConsoleCommand(char *)" (?ConsoleCommand@@YAXPAD>@Z) already defined in AOW.obj
dllmain.obj : warning LNK4006: "void __cdecl ConsoleCommand(char *)" (?ConsoleCommand@@YAXPAD>@Z) already defined in AOW.obj; second definition ignored
Creating library Debug/scripts.lib and object Debug/scripts.exp
Debug/scripts.dll : fatal error LNK1169: one or more multiply defined symbols found
Compile error [message #114388] Mon, 13 September 2004 13:12 Go to previous messageGo to next message
Dan
Messages: 395
Registered: August 2003
Location: UK
Karma: 0
Commander
o_O I dont know why that is happening, but its a Linktime error, not compiletime Wink
Compile error [message #114393] Mon, 13 September 2004 13:34 Go to previous messageGo to next message
Hammer_FIST is currently offline  Hammer_FIST
Messages: 17
Registered: September 2004
Karma: 0
Recruit
either way its an error when i try to compile lol
Compile error [message #114473] Mon, 13 September 2004 22:37 Go to previous messageGo to next message
weetbix is currently offline  weetbix
Messages: 16
Registered: May 2003
Karma: 0
Recruit
The problem occurs because it's finding two instances of ConsoleCommand in the whole project, one in AOW.cpp and the other in dllmain.cpp.

The way I solved this problem was to comment out the instance in dllmain and add the following to the top of the dllmain.cpp file.

#include "AOW.h"


However for this to work properly you have to make sure the following code is in AOW.h

void ConsoleCommand(char *msg);


WOL: - davrulezz
- dkracing0
Compile error [message #114479] Tue, 14 September 2004 00:37 Go to previous message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

Assuming this is the latest SSAOW, a better idea is to remove ConsoleCommand alltogether.
Then add #include <engine.h> to the top of both files.
Then replace the calls to ConsoleCommand with calls to Console_Input.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Previous Topic: Renegade Alert: Soviet Mammoth Tank; Camos Crossing.
Next Topic: Moderator - go ahead and lock this thread, just info.
Goto Forum:
  


Current Time: Mon Nov 11 19:06:59 MST 2024

Total time taken to generate the page: 0.00692 seconds