Game Development Community

Torque makefile question on Linux

by Mike Stoddart · in Torque Game Engine · 09/03/2002 (3:22 pm) · 4 replies

I really know nothing about makefiles on Linux that don't individually compile each and every source file so bear with me!

I added a new source file into the gui directory, and wanted to rebuild the Linux dedicated server. I copied the complete directory structure to my Linux drive and performed a full build. The link failed, so do I need to modify any makefiles to compile the new file or should it be compiled automatically? It wasn't built during the compilation and I think this is the reason the link failed.

For the record, this is the error:

Quote:--> Linking out.GCC2.RELEASE/torqueDemod.exe
out.GCC2.RELEASE/gui/guiCanvas.obj(.gnu.linkonce.d.__vt_19GuiBitmapButtonCtrl+0x88): undefined reference to 'GuiBitmapButtonCtrl::onRender(Point2I, RectI const &)'
out.GCC2.RELEASE/gui/guiCanvas.obj(.gnu.linkonce.d.__vt_19GuiBitmapButtonCtrl+0x8c): undefined reference to 'GuiBitmapButtonCtrl::onWake(void)'
out.GCC2.RELEASE/gui/guiCanvas.obj(.gnu.linkonce.d.__vt_19GuiBitmapButtonCtrl+0x90): undefined reference to 'GuiBitmapButtonCtrl::onSleep(void)'
out.GCC2.RELEASE/gui/guiCanvas.obj(.gnu.linkonce.d.__vt_19GuiBitmapButtonCtrl+0xb0): undefined reference to 'GuiBitmapButtonCtrl::onMouseDown(GuiEvent const &)'
out.GCC2.RELEASE/gui/guiCanvas.obj(.gnu.linkonce.d.__vt_19GuiBitmapButtonCtrl+0xbc): undefined reference to 'GuiBitmapButtonCtrl::onMouseEnter(GuiEvent const &)'
out.GCC2.RELEASE/gui/guiCanvas.obj(.gnu.linkonce.d.__vt_19GuiBitmapButtonCtrl+0xc0): undefined reference to 'GuiBitmapButtonCtrl::onMouseLeave(GuiEvent const &)'
out.GCC2.RELEASE/gui/guiCanvas.obj: In function 'ConcreteClassRep::create(void) const':
out.GCC2.RELEASE/gui/guiCanvas.obj(.ConcreteClassRep::gnu.linkonce.t.create(void) const+0x1e): undefined reference to 'GuiBitmapButtonCtrl::GuiBitmapButtonCtrl(void)'
out.GCC2.RELEASE/gui/guiCanvas.obj: In function 'ConcreteClassRep::init(void) const':
out.GCC2.RELEASE/gui/guiCanvas.obj(.ConcreteClassRep::gnu.linkonce.t.init(void) const+0x2a): undefined reference to 'GuiBitmapButtonCtrl::initPersistFields(void)'
out.GCC2.RELEASE/gui/guiCanvas.obj(.ConcreteClassRep::gnu.linkonce.t.init(void) const+0x2f): undefined reference to 'GuiBitmapButtonCtrl::consoleInit(void)'
collect2: ld returned 1 exit status
make[1]: *** [out.GCC2.RELEASE/torqueDemod.exe] Error 1
make: *** [dedicated] Error 2

I added the GuiBitmapButtonCtrl files, so the build process isn't picking up the new file. Any suggestions?

Thanks

#1
09/03/2002 (7:48 pm)
Try a clean build, meaning do make clean and then try compiling. That should do it. And yes it's suppose to automatically link the new file with the rest for compiling. If that doesn't work then I have no idea. :(
#2
09/03/2002 (8:59 pm)
Doh! I was searching with grep for GuiBitmapButtonCtrl, but I think the actual filename is guiBitmapButtonCtrl.

My mistake! Thanks though.
#3
09/04/2002 (7:04 pm)
does it really link new files automatically? I've always added them manually to the engine/targets.torque.mk file.
#4
09/07/2002 (12:29 pm)
It doesn't automatically pick up new files. They need to be added to engine/targets.torque.mk.