I just upgraded to Leopard and XCode 3 and I can’t build the demo AU. What am I doing wrong? I’m using the most current version from svn.
First, if I setup juce.xcconfig for 10.4 compatibility there is a compile error in AUBase:
/Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp:1306: error: ‘kAudioUnitRenderAction_PostRenderError’ was not declared in this scope
if I set up juce.xcconfig for 10.5 there is an error in the AU wrapper code, line 179 “ISO C++ forbids declaration of ‘type name’ with no type”:
The error in the wrapper code had to do with the use of the uint8 type which is typedefed in juce_MathsFunctions.h. Something must be wrong here to make this happen. Please advise. Anyway, I changed uint8 to UInt8 and it builds fine using the 10.5 settings.
Now, of course I don’t want to target 10.5 only. As I said when I targeted 10.4 and use the 10.4 SDK (as laid out in juce.xcconfig) there was a build error in AUBase. The Core Audio SDK ReleaseNotes.rtf says this:
thus, the xcconfig file should read:
// For 10.4 (and later) compatibility, use these instead:
MACOSX_DEPLOYMENT_TARGET = 10.4
// SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk
// For 10.5 (and later) compatibility, use these instead:
// MACOSX_DEPLOYMENT_TARGET = 10.5
SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk
I would have thought we’d get double define warnings rather than not defined (I have 1584 from that ; ) but there you go. Doing a conditional define didn’t seem to help though, so I’m not sure juce’s version is masking the other?
Could the two be close enough to disrupt? If I do juce::uint64 that works, but in which case shouldn’t it find the OS define?
I suppose. I made my own types for 3 or 4 things I was using, in the same vein - I’m working with times in nanoseconds a lot, or video frame times. So that was an enforced improvement anyway ; )
The rest, I mostly just added the juce namespace to. It’s OK. Just weird. How can a non-defined type mask a namespace type? Maybe a GCC change rather than OS X?