Game Development Community

Namespaces... fine. But what of macros?

by Anthony Lovell · in Torque Game Engine · 07/05/2006 (9:54 am) · 3 replies

What is the prescribed fix for two third-party code bases I want to bring together, both of which (TNL and Delta3D) saw fit to create a macro called "BIT"?

Would it be wise for TNL (and Delta3D) in future to prepend a namespace-like identifier to all macros?

What is the simplest categoric fix for my current bind?


edit: I found that a case-sensitive, whole-word-only, global search-and-replace on BIT as TNL_BIT "fixed" this nicely for now

tone

#1
07/06/2006 (11:42 am)
Wow, another Delta3D/TNL user? I thought I was alone.

The two macros perform the same operation. I have simply been ignoring the warning generated. Your solution will (obviously) work, but I try to stay away from modifying 3rd party libs unless absolutely necessary. When I distribute my project, I would like to be able to tell the user to simply download/compile any 3rd party libs, and then link them with my project - no modifications necessary.

I would post this on the Delta3D forums, as it is under more active development. DELTA_BIT would be nice.
#2
07/06/2006 (1:04 pm)
Shyam... I wonder if I could contact you? I have some questions on TNL.
Is there a phone number or IM/email address I could use?

I am "StupidLagger" on AIM and tone@dreadnoughtproject.org (watch for a challenge email in reply and click the link... you won't be bothered with that again).

tone
#3
07/06/2006 (5:45 pm)
You can contact me through email @: shyamguth AT gmail DOT com