"Daryle Walker"
On 12/27/05 10:52 PM, "Gennadiy Rozental"
wrote: I had the same problem with vc 7.1.
Strange. I never had problems like this with vc7.1
If you add 'static' to all variables definitions in anonymous namespaces it works fine.
But anonimous namespace should do the trick itself!
I don't think that the two concepts are identical. For a global object defined in a file, "static" limits that object to only be reachable to other items within that file. An object in the anonymous namespace has an unreachable name outside its file, but the object itself is still technically a program-wide global.
Well, in this case it should lead to the same result: no duplicate symbols Gennadiy