I’ve a little problem while compiling with juce when both DONT_SET_USING_JUCE_NAMESPACE and JUCE_NAMESPACE are set.
I’m using other namespaces where some symbols are redefined compared to Juce. For example, the tchar, uint8, uint32 and so on are not typedef the same way.
So, the compiler reject the object because of “ambiguous symbol” (uint8, tchar, etc…)
I think the typedefs Juce is using should be in Juce namespace too, and the jucer should allow to prefix all the type by “juce::” if an option is set to use juce in its own namespace.
So, for people who don’t care about juce namespace, they will be no change, but for other, it’s possible to use juce in its own private namespace (no global types, no global macro (T ?) which mess template definition) and so on.
For information the offending types are in :
juce\src\juce_core\text\juce_CharacterFunctions.h
juce\src\juce_core\basics\juce_MathsFunctions.h
Please notify if you are going to fix this or if I should modify in my local copy.
Good point - yes, those should also be in the namespace, and it’s just an oversight that they’re not. I’ll certainly move them over for the next version.
…no, hang on, they are in the juce namespace… As you can see, there’s a namespace declared around the inclusion of juce_MathsFunctions.h in juce_StandardHeader.h
where the first line was wrong (further down the road, it defined namespace { } which is the global namespace hence the conflict).
However, about the jucer, it should have an option to write juce:: in front of each juce specific name (or made it the default value, as it won’t hurt).
Similarly, using JUCE_T instead of T will be better