[Bf-committers] MacOS Compile Solved - WARNING
Douglas Toltzman
bf-committers@blender.org
Tue, 21 Oct 2003 17:17:53 -0400 (EDT)
On Tue, 21 Oct 2003, Douglas Bischoff wrote:
> On Saturday, September 27, 2003, at 08:55 AM, Douglas Toltzman wrote:
>
> > I suppose we'd have to include #ifdefs to protect the entire mess from
> > compilers that don't support namespaces. However, the QT code is
> > obviously localized to two environments (Win32 and Mac). I'm thinking
> > it
> > can be done in such a way that future conflicts can be avoided.
>
> Hello, Doug:
>
> Well, it seems that the problem has come back, and you were the only
> person who ever expressed any interest in how to solve it.
Well, I did do some testing and I discovered that useing a namespace
adds an additional symbol (the namespace name) to each symbol in the load
table. This means that we'd have to create a blender namespace, because
if we put the Quicktime headers into a qt namespace, the libraries will no
longer link/load with our code; unless, of course, we could also recompile
the QT libraries, which is beyond our scope of control.
Hence, the namespace support in the C++ compiler would allow us to declare
all of the C++ classes, etc. of the blender code in our own namespace,
hence protecting us from any collision, ever. But, I don't think Ton, or
anyone else would want to touch every source file for such a "trivial"
problem. I guess you'd like this onto killing a roach with a tactical
nuclear weapon.
Someday, everyone should declare their classes in a private namespace to
avoid name collisions. In the meantime, we'll have to find a more
creative solution. BTW: I just finally purchased OS X v10.2 so I could
setup a Blender build environment and have a look at this. Previously, I
only had the 10.1 tools and I had little or no time to spend on Blender
development.
I do think this problem can be resolved without too much wrangling, but it
may take me some time to get my Mac setup with all the pre-reqs for
Blender builds.
Douglas Toltzman
p.s. I hope you don't mind that I cc'd the list. I had meant to post the
results of my testing, but it slipped through the cracks.