Starting Point

Hey Everyone

Total newbie here. I’m trying to compile the Starting Point tutorial files in XCode. I get an error at "#include <juce/juce.h> because the compiler can’t find it. Two questions:

  1. Right above it the comment says:

Using <juce/juce.h> here assumes the juce source tree is accessible

In Xcode add the directory containing ‘juce’ as a source tree named JUCE_SOURCE

How do I do that?

  1. I understand that the preprocessor is looking in the search path specified in Header Search Paths within my XCode project. That’s currently set to ($JUCE_SOURCE). What does that mean?


This looks suspiciously like my method of including juce! (So I guess it’s from this file:

The introjucer would be a better place to start (I should probably update my fork of that tutorial.)

Anyway to get you going… To add a “Source Tree” in Xcode:

[]Go to Xcode->Preferences[/]
[]Find and select Source Trees on the toolbar[/]
[]Click the add “+” button[/]
[]Enter a Setting Name (the symbol in code), Display Name (a human readable version if you wish) and the path.[/][/list]

For my version of the tutorial to work set both the Setting Name and Display Name to JUCE_SOURCE (as this is what it’s looking for as you say in header search paths). Set the path to the directory containing Juce (such that the relative path “juce/juce.h” finds the juce.h file). For example, the path of juce on my machine is something like:


I set my JUCE_SOURCE source tree to:


This assumes Xcode 3.x (I checked out Xcode 4 a while ago but haven’t moved to it yet, so I’m not usre if the concept of Source Trees has been removed/changed.)

Hope that helps…

It worked! Thanks Martin.