ProJucer Bug? CSCommon.h on OS X 10.11


#1

I tried loading my project up into ProJucer and I get the following error when I try to run/compile

enumerator value evaluates to -2147483648, which cannot be narrowed to type 'uint32_t' (aka 'unsigned int')

The source of this error is in CSCommon.h, provided by Apple in their Security.framework on os x 10.11

the line that gets flagged is in the middle of a block comment ( /* */ ) so i'm only guessing here that the actual code causing the error is: 

//line 170
typedef u_int32_t SecGuestRef;
CF_ENUM(SecGuestRef) {
    kSecNoGuest = 0,        /* not a valid SecGuestRef */
};

This is the only error that appears in ProJucer for me.  my project runs just fine in XCode so I have no idea what is causing this.  

Does anyone else experience this?   Also, why does ProJucer think any subclassing of "Component" is ambiguous?  it's demanding that i instead write "juce::Component" everywhere I subclass Component.  


#2

Have a look at the file juce_mac_ClangBugWorkaround.h in juce_core/native

There's a bug in Apple's headers that breaks with the latest version of Clang - that file contains our hack to workaround it. If you're including Apple headers directly in your own code you might want to use it.


#3

thanks, got it working.   in the other thread i started about AudioDeviceManager, i followed your advice to initialize the device via: initialiseWithDefaultSettings(0,2); and it eliminated my need for using apple headers.  problem solved!