Namespace mess with extra include


in order to allow for legacy support of the QuickTime Music Synthesizer on the Mac, I need to include the QuickTimeMusic framework. Therefore I put this at the very beginning of the involved cpp file:

[code]#define Point CarbonDummyPointName // (workaround to avoid definition of “Point” by old Carbon headers)
#include <QuickTime/QuickTimeMusic.h>
#undef Point

#include “MyClass.h”

The header MyClass.h (indirectly) includes JuceHeader.h as the first include file. Now I get loads of errors:

error: 'uint16' does not name a type error: 'uint8' does not name a type error: 'uint32' does not name a type

These errors do not occur when I comment out the QuickTime include statement. This indicates that I have a namespace issue (because these types are included by juce.h). My own code obviously is no longer compiled in JUCE_NAMESPACE, which it should. How could the QuickTime include mess around with namespaces that much?

  • Is there a way to debug at compile time which namespace is currently active?
  • Did anyone successfully include the QuickTimeMusic framework, or a similar one that is not included by Juce out of the box?

Any hint is much appreciated!

For everyone interested: I now solved this problem by isolating the code that uses QuickTimeMusic in a separate cpp/h file that does not use the Juce library. It now compiles fine. I wrote a small API that uses simple types only (three functions only). For the intended purpose, this was sufficient.