Compiling Open Source Editor
Author | Topic: Compiling Open Source Editor |
---|---|
Shock Trooper
Member # 7662
|
written Saturday, August 18 2007 21:48
Profile
I initially could not compile the Open Source Editor on Dev-C++, I got the following error: 427 dlogtool.cpp implicit declaration of function `int atoi(...)' The error was corrected by adding this to the start of dlogtool.cpp: #include "stdlib.h" So far so good, but then I could not get the linking to work. Can anyone tell me what is an undefined reference and how can I correct it? There are a few problems with the Editor that I would like to correct. Linking Errors reported were as follows: c:\dev-c++\examples\blades of exile source code\blscened.o(.text+0x350):blscened.cpp: undefined reference to `load_sounds(void)' c:\dev-c++\examples\blades of exile source code\blscened.o(.text+0x22f7):blscened.cpp: undefined reference to `play_sound(short)' c:\dev-c++\examples\blades of exile source code\dlogtool.o(.text+0x949):dlogtool.cpp: undefined reference to `play_sound(short)' c:\dev-c++\examples\blades of exile source code\dlogtool.o(.text+0x440d):dlogtool.cpp: undefined reference to `play_sound(short)' c:\dev-c++\examples\blades of exile source code\dlogtool.o(.text+0x4771):dlogtool.cpp: undefined reference to `play_sound(short)' c:\dev-c++\examples\blades of exile source code\graphics.o(.text+0x606):graphics.cpp: undefined reference to `play_sound(short)' c:\dev-c++\examples\blades of exile source code\graphutl.o(.text+0xed6):graphutl.cpp: more undefined references to `play_sound(short)' follow Posts: 292 | Registered: Monday, November 13 2006 08:00 |
Shock Trooper
Member # 10488
|
written Tuesday, September 18 2007 17:06
Profile
I'm pretty sure "undefined reference" means that it can't find a function. Assuming the function actually is defined, this means either it needs to be declared extern or it needs a prototype (also extern I think) in the file that references it (or a file #included by that file, obviously). I think I haven't missed any possibilities here... Posts: 334 | Registered: Friday, September 14 2007 07:00 |
Shock Trooper
Member # 7662
|
written Friday, October 5 2007 02:50
Profile
I can now get the open source editor to compile, but the resulting program is 296Kb versus the correct size of 735Kb. The economy size editor starts up properly then, I can't get it to load a scenario. Posts: 292 | Registered: Monday, November 13 2006 08:00 |