"Operands to ?: have different types" Errors [SOLVED]


#1

Hi everyone,

Yesterday I installed Juce on my Macbook. I was able to build the Introjucer in XCode (3.2.6) and able to open it. I opened Plugin Host.jucer from the Extras folder in the Introjucer application, selected AU plugin only, and opened the project in XCode.

When I built this, I got 20 or so errors, with most of them saying: Operands to ?: have different types 'const juce::HeapBlock<unsigned char, false>' and 'const juce uint::8 [4]'.

Has anyone ever seen these types of errors when they built the sample audio plug-in on XCode? If so, what did you do to deal with it? Was it a matter of installing a new CoreAudio SDK? Thanks. 


#2

Wow, xcode 3 is pretty dated now - I think those errors are probably just because whatever old compiler you're using isn't very standards-complient.

This is easy to fix with a few casts, but since I no longer have xcode 3, you'd have to post the code locations where you hit these errors so I know where to look.


#3

Hi Jules,

Thank you so much for your help. The locations where these specific errors crop up are: pluginprocessor.cpp, plugineditor.cpp, juce_AU_Wrapper.mm (there is a "object missing in reference to MIDIPacket::data" error in this file as well), juce_audio_basics.mm, juce_audio_devices.mm, juce_audio_formats.mm, juce_audio_processors.mm, juce_audio_utils.mm, juce_PluginUtilities.cpp.

If building plug-ins on XCode 3.2.6 continues to be problematic, would it be recommended that I get a newer version of XCode? If so, which would be the best one? Thank you for your time and patience.


#4

Thanks.. without actual code locations that's almost completely useless, but I did try a build with GCC myself and fixed a problem in the MidiMessage class which may or may not account for all your problems, it's impossible to tell from your description. But try the latest code again, and if you still hit problems, tell the the actual line numbers.

Most people seem to have moved to Xcode 5 already, and I'd recommend doing that unless there's some reason why you need an older one.


#5

Hi Jules,

I downloaded the latest version of Juce from GitHub and performed all the aforementioned steps again, and I just have 2 errors now, all relating to the MIDIPacket data. 

The locations are: juce_AU_Wrapper.mm (line 874) and (line 875).

Both of these errors are connected an "object missing in reference to 'MIDIPacket::data'" from MIDIServices.h, line 366.

 

               


#6

Cheers - that should be fixed now too. No idea why GCC didn't like that code, it was perfectly ok.

If possible, I'd recommend LLVM, not GCC.