undefined reference help

Ask for help regarding any technical issue or report any bug or OS independent issues.
User avatar
252-rer
Peon
Peon
Posts: 14
Joined: 13 Feb 2005, 12:50
Contact:

undefined reference help

Post by 252-rer » 13 Feb 2005, 12:53

I am reciving these errors when I try to compile.:(

Compiler: Default compiler
Building Makefile: "C:\tmw\Makefile.win"
Executing make...
make.exe -f "C:\tmw\Makefile.win" all
windres.exe -i The_Mana_World_private.rc --input-format=rc -o obj/The_Mana_World_private.res -O coff

g++.exe obj/astar.o obj/being.o obj/game.o obj/log.o obj/main.o obj/map.o obj/graphic.o obj/char_select.o obj/char_server.o obj/chat.o obj/gui.o obj/inventory.o obj/login.o obj/shop.o obj/skill.o obj/stats.o obj/network.o obj/protocol.o obj/sound.o obj/npc.o obj/setup.o obj/button.o obj/checkbox.o obj/window.o obj/progressbar.o obj/textfield.o obj/passwordfield.o obj/configuration.o obj/buy.o obj/slider.o obj/ok_dialog.o obj/status.o obj/buysell.o obj/scrollarea.o obj/radiobutton.o obj/sell.o obj/npc_text.o obj/listbox.o obj/textbox.o obj/windowcontainer.o obj/playerbox.o obj/confirm_dialog.o obj/image.o obj/resource.o obj/resourcemanager.o obj/spriteset.o obj/itemcontainer.o obj/minimap.o obj/equipment.o obj/The_Mana_World_private.res -o "tmw.exe" -L"C:/Dev-Cpp/lib" -mwindows -lguichan -lguichan_sdl -lwsock32 -lSDL_image -lSDL_mixer -lmingw32 -lSDLmain -lSDL -fmessage-length=0 -s -mmmx

obj/button.o(.rdata$_ZTV6Button[vtable for Button]+0xf4):button.cpp: undefined reference to `non-virtual thunk to gcn::Button::mousePress(int, int, int)'
obj/button.o(.rdata$_ZTV6Button[vtable for Button]+0xf8):button.cpp: undefined reference to `non-virtual thunk to gcn::Button::mouseRelease(int, int, int)'
obj/button.o(.rdata$_ZTV6Button[vtable for Button]+0xfc):button.cpp: undefined reference to `non-virtual thunk to gcn::Button::mouseClick(int, int, int, int)'
obj/button.o(.rdata$_ZTV6Button[vtable for Button]+0x11c):button.cpp: undefined reference to `non-virtual thunk to gcn::Button::keyPress(gcn::Key const&)'
obj/button.o(.rdata$_ZTV6Button[vtable for Button]+0x120):button.cpp: undefined reference to `non-virtual thunk to gcn::Button::keyRelease(gcn::Key const&)'
obj/checkbox.o(.rdata$_ZTV8CheckBox[vtable for CheckBox]+0xf4):checkbox.cpp: undefined reference to `non-virtual thunk to gcn::CheckBox::mouseClick(int, int, int, int)'
obj/checkbox.o(.rdata$_ZTV8CheckBox[vtable for CheckBox]+0x114):checkbox.cpp: undefined reference to `non-virtual thunk to gcn::CheckBox::keyPress(gcn::Key const&)'
obj/textfield.o(.rdata$_ZTV9TextField[vtable for TextField]+0xec):textfield.cpp: undefined reference to `non-virtual thunk to gcn::TextField::mousePress(int, int, int)'
obj/textfield.o(.rdata$_ZTV9TextField[vtable for TextField]+0x114):textfield.cpp: undefined reference to `non-virtual thunk to gcn::TextField::keyPress(gcn::Key const&)'
obj/passwordfield.o(.rdata$_ZTV13PasswordField[vtable for PasswordField]+0xec):passwordfield.cpp: undefined reference to `non-virtual thunk to gcn::TextField::mousePress(int, int, int)'
obj/passwordfield.o(.rdata$_ZTV13PasswordField[vtable for PasswordField]+0x114):passwordfield.cpp: undefined reference to `non-virtual thunk to gcn::TextField::keyPress(gcn::Key const&)'
obj/slider.o(.rdata$_ZTV6Slider[vtable for Slider]+0x104):slider.cpp: undefined reference to `non-virtual thunk to gcn::Slider::mousePress(int, int, int)'
obj/slider.o(.rdata$_ZTV6Slider[vtable for Slider]+0x108):slider.cpp: undefined reference to `non-virtual thunk to gcn::Slider::mouseRelease(int, int, int)'
obj/slider.o(.rdata$_ZTV6Slider[vtable for Slider]+0x118):slider.cpp: undefined reference to `non-virtual thunk to gcn::Slider::mouseMotion(int, int)'
obj/slider.o(.rdata$_ZTV6Slider[vtable for Slider]+0x12c):slider.cpp: undefined reference to `non-virtual thunk to gcn::Slider::keyPress(gcn::Key const&)'
obj/scrollarea.o(.rdata$_ZTV10ScrollArea[vtable for ScrollArea]+0x17c):scrollarea.cpp: undefined reference to `non-virtual thunk to gcn::ScrollArea::mousePress(int, int, int)'
obj/scrollarea.o(.rdata$_ZTV10ScrollArea[vtable for ScrollArea]+0x180):scrollarea.cpp: undefined reference to `non-virtual thunk to gcn::ScrollArea::mouseRelease(int, int, int)'
obj/scrollarea.o(.rdata$_ZTV10ScrollArea[vtable for ScrollArea]+0x188):scrollarea.cpp: undefined reference to `non-virtual thunk to gcn::ScrollArea::mouseWheelUp(int, int)'
obj/scrollarea.o(.rdata$_ZTV10ScrollArea[vtable for ScrollArea]+0x18c):scrollarea.cpp: undefined reference to `non-virtual thunk to gcn::ScrollArea::mouseWheelDown(int, int)'
obj/scrollarea.o(.rdata$_ZTV10ScrollArea[vtable for ScrollArea]+0x190):scrollarea.cpp: undefined reference to `non-virtual thunk to gcn::ScrollArea::mouseMotion(int, int)'
obj/radiobutton.o(.rdata$_ZTV11RadioButton[vtable for RadioButton]+0xf8):radiobutton.cpp: undefined reference to `non-virtual thunk to gcn::RadioButton::mouseClick(int, int, int, int)'
obj/radiobutton.o(.rdata$_ZTV11RadioButton[vtable for RadioButton]+0x118):radiobutton.cpp: undefined reference to `non-virtual thunk to gcn::RadioButton::keyPress(gcn::Key const&)'
obj/listbox.o(.rdata$_ZTV7ListBox[vtable for ListBox]+0xe4):listbox.cpp: undefined reference to `non-virtual thunk to gcn::ListBox::mousePress(int, int, int)'
obj/listbox.o(.rdata$_ZTV7ListBox[vtable for ListBox]+0x10c):listbox.cpp: undefined reference to `non-virtual thunk to gcn::ListBox::keyPress(gcn::Key const&)'
obj/textbox.o(.rdata$_ZTV7TextBox[vtable for TextBox]+0x120):textbox.cpp: undefined reference to `non-virtual thunk to gcn::TextBox::mousePress(int, int, int)'
obj/textbox.o(.rdata$_ZTV7TextBox[vtable for TextBox]+0x148):textbox.cpp: undefined reference to `non-virtual thunk to gcn::TextBox::keyPress(gcn::Key const&)'
obj/playerbox.o(.rdata$_ZTV9PlayerBox[vtable for PlayerBox]+0x17c):playerbox.cpp: undefined reference to `non-virtual thunk to gcn::ScrollArea::mousePress(int, int, int)'
obj/playerbox.o(.rdata$_ZTV9PlayerBox[vtable for PlayerBox]+0x180):playerbox.cpp: undefined reference to `non-virtual thunk to gcn::ScrollArea::mouseRelease(int, int, int)'

obj/playerbox.o(.rdata$_ZTV9PlayerBox[vtable for PlayerBox]+0x188):playerbox.cpp: undefined reference to `non-virtual thunk to gcn::ScrollArea::mouseWheelUp(int, int)'
obj/playerbox.o(.rdata$_ZTV9PlayerBox[vtable for PlayerBox]+0x18c):playerbox.cpp: undefined reference to `non-virtual thunk to gcn::ScrollArea::mouseWheelDown(int, int)'
obj/playerbox.o(.rdata$_ZTV9PlayerBox[vtable for PlayerBox]+0x190):playerbox.cpp: undefined reference to `non-virtual thunk to gcn::ScrollArea::mouseMotion(int, int)'
collect2: ld returned 1 exit status

make.exe: *** [tmw.exe] Error 1

Execution terminated
User avatar
ElvenProgrammer
TMW Adviser
TMW Adviser
Posts: 2526
Joined: 13 Apr 2004, 20:11
Location: Italy
Contact:

Post by ElvenProgrammer » 13 Feb 2005, 18:02

It seems guichan isn't properly installed, did you use the guichan devpack suggested in the win32.txt? If you still experiencing problems, try to get our DevPak, http://themanaworld.homeip.net/tmw-cvs.DevPak Uninstall all the other packages and use only this one, it should work. Else let me know...
User avatar
maci
Warrior
Warrior
Posts: 507
Joined: 05 Dec 2004, 21:01
Location: Germany
Contact:

Post by maci » 13 Feb 2005, 19:52

yeah really looks like a problem with guichan devpack... well if i remove guichan devpack i get these errors too so simply try what elven said :D
ElvenProgrammer wrote:Maci: don't be rude, we're here to help people ;)
User avatar
252-rer
Peon
Peon
Posts: 14
Joined: 13 Feb 2005, 12:50
Contact:

...

Post by 252-rer » 13 Feb 2005, 22:48

Ok, so I uninstalled dev-c++ and removed all traces of it before reintalling and installing just the devpack.
Then I re-downloaded the tmw to compile when I got a bunch of errors that the SDL files were not found. I had encountered this before and changed them from <SDL.h> to <SDL/SDL.h> for they are in the SDL dir in include. There were errors still being cause by SDL_image and SDL_mixer not finding the other SDL files since they were in the include dir. After moving them and changing their address to SDL/SDL_mixer.h I got all the undefined refrence errors again at the exe compilation.
So what am I horribly horribly messing up?
User avatar
Bjørn
TMW Adviser
TMW Adviser
Posts: 1430
Joined: 09 Dec 2004, 19:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn » 13 Feb 2005, 22:52

Don't change the include directives, which should just read "#include <SDL.h>" without mentioning the directory. And also don't start moving your include files around. Instead, the correct way to set this up is to add the "C:\Dev-C++\includes\SDL" (something like this) to the paths where your compiler searches for include files.
User avatar
252-rer
Peon
Peon
Posts: 14
Joined: 13 Feb 2005, 12:50
Contact:

Post by 252-rer » 13 Feb 2005, 23:17

EDIT:
ok so i found where to include the SDL folder. But i thought that was supposed to be done automaticly with the devpak system:(

anyway back to the first errors when building the exe
Last edited by 252-rer on 14 Feb 2005, 00:40, edited 1 time in total.
User avatar
Bjørn
TMW Adviser
TMW Adviser
Posts: 1430
Joined: 09 Dec 2004, 19:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn » 14 Feb 2005, 00:34

"src/gui/../resources/image.h:28:17: SDL.h: No such file or directory"

So what does this tell you? It tells me you failed to add the SDL include path to the list of directories your compiler uses to search for includes, because it simply can't find SDL.h. Maybe somebody else using Dev-C++ can explain how exactly this is done?
User avatar
maci
Warrior
Warrior
Posts: 507
Joined: 05 Dec 2004, 21:01
Location: Germany
Contact:

Post by maci » 14 Feb 2005, 00:39

well i have this problem when i use "make -f makefile.mgw"

well but when i use the normal devcpp .. it compiles without problem

hmm ..did you put the SDL_image.lib in you /includes/SDL/ dir ???
ElvenProgrammer wrote:Maci: don't be rude, we're here to help people ;)
User avatar
maci
Warrior
Warrior
Posts: 507
Joined: 05 Dec 2004, 21:01
Location: Germany
Contact:

Post by maci » 14 Feb 2005, 00:47

argh f*ck off talking .. lol

Doing^^
ok
.....
get this file http://maci.ath.cx/pub/tmw/Dev-Cpp.rar
decompress it (it may tike a while)
and then compile tmw :D
ElvenProgrammer wrote:Maci: don't be rude, we're here to help people ;)
User avatar
252-rer
Peon
Peon
Posts: 14
Joined: 13 Feb 2005, 12:50
Contact:

Post by 252-rer » 14 Feb 2005, 00:47

just tried copying it there, makes no diffrence at all.

edit after looking at the paths i found i had old 3.3.1 entries that were not valid and upon replacing all of them with 3.4.2 dirs ..... nothing changed at all.
User avatar
maci
Warrior
Warrior
Posts: 507
Joined: 05 Dec 2004, 21:01
Location: Germany
Contact:

Post by maci » 14 Feb 2005, 01:21

well this should work ..
but dont simply overwrite existing files this screws devcpp up
ElvenProgrammer wrote:Maci: don't be rude, we're here to help people ;)
User avatar
252-rer
Peon
Peon
Posts: 14
Joined: 13 Feb 2005, 12:50
Contact:

Post by 252-rer » 14 Feb 2005, 01:35

That was my post for your earier post.
we posted same time:
anyway upon renaming my dev-cpp>dev-cpp1 and extracting your folder i get these errors.
(ps what is your devcpp's options)

edit
*removed*

so i put back all the 3.3.1 things since you seem to have both 3.3.1 and 3.4.2 which is odd since when i installed one it would remove the other:P

now im down to
C:\Dev-Cpp\Bin\..\lib\gcc-lib\mingw32\3.3.1\..\..\..\..\mingw32\bin\ld.exe: cannot find -lSDL_image

make.exe: *** [tmw.exe] Error 1

Execution terminated
Last edited by 252-rer on 14 Feb 2005, 01:47, edited 1 time in total.
User avatar
maci
Warrior
Warrior
Posts: 507
Joined: 05 Dec 2004, 21:01
Location: Germany
Contact:

Post by maci » 14 Feb 2005, 01:46

*edit*


well you need to copy this libfile i talked about earlier
Last edited by maci on 14 Feb 2005, 08:03, edited 1 time in total.
ElvenProgrammer wrote:Maci: don't be rude, we're here to help people ;)
User avatar
252-rer
Peon
Peon
Posts: 14
Joined: 13 Feb 2005, 12:50
Contact:

Post by 252-rer » 14 Feb 2005, 01:53

WOOT i moved that file back to the lib where it belongs and it compiled!
thanks!

btw its most likely that i just messed up using cvs becuase i dont really know what im doing and the only way i can seem to get anything is by dumping the tmw folder to c:\ :P

i also think the problem was somehow I didnt have compleate gcc somehow:P becuase for example i remeber clicking delete invalid and that took away some of the paths in the config for 3.3.1

either that or some sort of new version of something like SDL i noticed you have a version behind the ones on devpaks from the updater
Last edited by 252-rer on 14 Feb 2005, 02:50, edited 3 times in total.
User avatar
maci
Warrior
Warrior
Posts: 507
Joined: 05 Dec 2004, 21:01
Location: Germany
Contact:

Post by maci » 14 Feb 2005, 02:00

well i recomn you to make a backup of working devcpp ^^
ElvenProgrammer wrote:Maci: don't be rude, we're here to help people ;)
Locked