Compile with XCode 4


#1

Hi All,

I’m a newbie with Mac OSX / XCode 4.

I used Introjucer to setup a new fresh project, giving paths to Juce and VST sources, but always getting compile errors like:

This using “Base SDK” = 10.6 in the Target Build Settings.

If instead I use “Base SDK” = 10.5 or 10.4, errors like

juce_amalgamated.h:631:19: error: cstdlib: No such file or directory juce_amalgamated.h:632:19: error: cstdarg: No such file or directory juce_amalgamated.h:633:19: error: climits: No such file or directory juce_amalgamated.h:634:17: error: cmath: No such file or directory ...

arise.

Could someone give some tips to get a working project on XCode 4?

Cheers
Emanuele


#2

Took an old project that compiled successfully with XCode 3.2; now errors are:

[code]juce_amalgamated.h:54317: error: extra qualification ‘juce::LookAndFeel::’ on member ‘drawGridButtonShape’

juce_AU_Wrapper.mm:1157: error: ‘AudioUnitCarbonViewEventListener’ does not name a type
juce_AU_Wrapper.mm:1195: error: ‘SizeControl’ was not declared in this scope
juce_AU_Wrapper.mm:1197: error: ‘HIViewGetWindow’ was not declared in this scope
juce_AU_Wrapper.mm:1230: error: ‘GetWindowEventTarget’ was not declared in this scope
juce_AU_Wrapper.mm:1304: error: ‘SizeControl’ was not declared in this scope[/code]


#3

It sounds like you don’t actually have the older 10.4 or 10.5 SDKs installed on your machine…?

Have to admit that I’ve not actually had chance to try XCode 4 yet though! Has anyone else had a problem with it?


#4

SDKs are there because I had to manually copy the folders SDKs/MacOSX10.4u and SDKs/MacOSX10.5 from the old /Developer to the new /Developer folder


#5

Perhaps manually copying them isn’t enough to make XCode use them correctly…


#6

[quote=“jules”]
Have to admit that I’ve not actually had chance to try XCode 4 yet though! Has anyone else had a problem with it?[/quote]

No problems here, but I can’t use it for production code yet because:

lelepar, you’re at risk of really wandering off into the weeds by attempting force older SDKs into XCode; SDK 10.5 and below are highly unsupported on XCode4. You can’t build PPC UBs anyway with XCode4, so the Leopard/Tiger SDKs aren’t really that useful[1].

If you need 10.4/10.5 SDK support, you need to use XCode3[2].

[1] You’re not confusing Deployment Target with SDK are you? You can still target 10.5 with XCode4, you’re just using 10.6 SDK to do so.

[2] which is admittedly miserable after spending any quality time with XCode4.


#7

http://hints.macworld.com/article.php?story=20110318050811544