Game Development Community

Separating Torque operator new from static libray operator new

by Rob Segal · in Torque Game Engine · 10/03/2006 (10:05 pm) · 3 replies

I'm getting linker errors from a custom static library which I am trying to link against Torque. The problem I believe I am running into is that Torque overrides operator for it's own purposes. Hey that's fine. I have this custom library which uses the global operator new. That's great. When the two get together they start fighting. Is there a way I can use one operator new in my custom library and leave Torque to use it's own version. I'm thinking I may be able to wrap my custom lib in a namespace but well I'm looking for some other ideas.

#1
10/04/2006 (11:58 am)
Rob i just solved this in another project by putting the static library in a DLL. Probably not what you wanted to hear, but i have to admit that i didn't spend much time working on the issue.
#2
10/04/2006 (12:07 pm)
Doh! Well going with a DLL was definitely not my preferred choice but that is good to know it works. Thanks Tom.
#3
10/05/2006 (11:45 am)
Yep. Tried it out. Works fine. Thanks again Tom.