Well-Actually War Trall Ishad Nha Posted August 19, 2007 Share Posted August 19, 2007 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 Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted September 19, 2007 Share Posted September 19, 2007 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... Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted October 5, 2007 Author Share Posted October 5, 2007 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.