Disabling Memory Manager In TGE 1.5.2
by Scott Doerrfeld · in Torque Game Engine · 12/06/2007 (10:46 am) · 3 replies
I am trying to disable Torque's Memory Manager (am using STL instead). I am doing this on Linux but I imagine it is similar across all platforms. After having set the TORQUE_DISABLE_MEMORY_MANAGER flag in platform/platform.h and following all the advice I could find on the forums, I am still getting linking errors.
I tried commenting out the following in x86UNIXMemory.cc:
/*
//--------------------------------------
void* FN_CDECL operator new(dsize_t, void* ptr
{
return (ptr);
}
*/
But then when I got to the linking stage there were TONS of errors regard SimObjects along the lines of:
guiTabPageCtrl.cc:(.text+0x2c7): undefined reference to 'typeinfo for SimObject'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x14): undefined reference to 'SimObject::save(char const*, bool)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x18): undefined reference to 'SimObject::dumpClassHierarchy()'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x1c): undefined reference to 'SimGroup::processArguments(int, char const**)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x28): undefined reference to 'SimObject::onGroupAdd()'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x2c): undefined reference to 'SimObject::onGroupRemove()'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x30): undefined reference to 'SimObject::onNameChange(char const*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x34): undefined reference to 'SimObject::onStaticModified(char const*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x40): undefined reference to 'SimSet::onDeleteNotify(SimObject*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x4c): undefined reference to 'SimGroup::findObject(char const*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x50): undefined reference to 'SimObject::writeField(char const*, char const*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x58): undefined reference to 'SimObject::writeFields(Stream&, unsigned int)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x60): undefined reference to 'SimSet::reOrder(SimObject*, SimObject*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x6c): undefined reference to 'SimSet::pushObject(SimObject*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x70): undefined reference to 'SimSet::popObject()'
I just can't seem to get the linker happy. Can anyone offer any advice?
I tried commenting out the following in x86UNIXMemory.cc:
/*
//--------------------------------------
void* FN_CDECL operator new(dsize_t, void* ptr
{
return (ptr);
}
*/
But then when I got to the linking stage there were TONS of errors regard SimObjects along the lines of:
guiTabPageCtrl.cc:(.text+0x2c7): undefined reference to 'typeinfo for SimObject'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x14): undefined reference to 'SimObject::save(char const*, bool)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x18): undefined reference to 'SimObject::dumpClassHierarchy()'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x1c): undefined reference to 'SimGroup::processArguments(int, char const**)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x28): undefined reference to 'SimObject::onGroupAdd()'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x2c): undefined reference to 'SimObject::onGroupRemove()'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x30): undefined reference to 'SimObject::onNameChange(char const*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x34): undefined reference to 'SimObject::onStaticModified(char const*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x40): undefined reference to 'SimSet::onDeleteNotify(SimObject*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x4c): undefined reference to 'SimGroup::findObject(char const*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x50): undefined reference to 'SimObject::writeField(char const*, char const*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x58): undefined reference to 'SimObject::writeFields(Stream&, unsigned int)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x60): undefined reference to 'SimSet::reOrder(SimObject*, SimObject*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x6c): undefined reference to 'SimSet::pushObject(SimObject*)'
out.GCC4.RELEASE/gui/controls/guiTabPageCtrl.obj:(.gnu.linkonce.r._ZTV14GuiTabPageCtrl+0x70): undefined reference to 'SimSet::popObject()'
I just can't seem to get the linker happy. Can anyone offer any advice?
About the author
#3
).
I've actually gotten it to compile, but as soon as I do something with STL (i.e. resize vector) the program seg faults.
12/07/2007 (7:37 am)
Thanks Stephen, but I tried applying the STL fix, only to find that it doesn't work with GCC4 on Linux (has a problem with I've actually gotten it to compile, but as soon as I do something with STL (i.e. resize vector) the program seg faults.
Torque Owner Scott Doerrfeld