Game Development Community

Link error with latest head and guibitmapbuttonctrl

by Dr. John Nobody · in Torque Game Engine · 07/02/2003 (7:22 am) · 4 replies

This question is probably horribly newbish but here it goes. I got the latest head last night and I've been adding resources. I got seriously hung up with guibitmapbuttonctrl (submitted by Tim Newell), it compiles fine, but I keep getting link errors:

Linking...
guiBitmapButtonCtrl.obj : error LNK2001: unresolved external symbol "public: virtual class AbstractClassRep * __thiscall GuiBitmapButtonCtrl::getClassRep(void)const " (?getClassRep@GuiBitmapButtonCtrl@@UBEPAVAbstractClassRep@@XZ)
../example/torqueDemo_DEBUG.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

torqueDemo_DEBUG.exe - 2 error(s), 0 warning(s)

unfortunately I dont have enough experience with OO programming (and almost none in C++), the best I can tell is that the project isnt recognizing the guibitmapbuttonctrl class for whatever reason it says up there... a little help?

(btw, do things like this ever just get added as part of the engine? this just seems like one of those resources that would be really usefull to everyone, and wouldnt bother people who didnt want it)

#1
07/02/2003 (5:22 pm)
I think it's missing the DECLARE_CONOBJECT(GuiBitmapButtonCtrl) Macro call.
#2
07/02/2003 (6:16 pm)
Thanks Xavier, it could be that... I figure I'll go ahead and let eveyrone know that I tried 4 different resources from different people on guibitmapbuttonctrl (I believe thats all there are) and the only one that worked was
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=1689
by Cordier daniel, so this is the unofficial announcement, as of July 2nd 2k3 the only guibitmap button that works with the current head without modifying is Cordier daniel's, in case anyone has this problem and stumbles on this thread
#3
07/02/2003 (7:24 pm)
It's not a thing that it works or not, but guiCtrls need to be declared in the global gui file... or you can do it in the file itself, but I'm guessing that resource you talk about didn't do it in it's own file but in the global one. Anyway... it's a very simple thing to code, you could do it yourself.
#4
09/14/2004 (6:54 am)
I got it, put

IMPLEMENT_CONOBJECT(GuiBitmapButtonCtrl);

right after the header declarations in the *.cc file.