Compiling and adding files in XCode



I am new to programming on the Mac Platform and I am having some problems in XCode.

I used to IntroJucer to setup a project. I had the main, MainWindow.h and MainWindow.cpp files generated and then opened the project in XCode. I compiled it and it works fine and shows me the basic GUI window. Now to add and design a UI on top of that I tried adding .h and .cpp files to make a new Component and begin to develop a custum GUI but I get many errors. For example #include “juce.h” doesn’t work.

How do I setup the project and add the necessary path for it to find the API classes in the JUCE Library? Like in Visual studio the drill is to go to project properties and add additional dependencies? but in Xcode I can’t seem to find a way to do the same and be able to develop on top of this basic program.

Any help greatly appreciated!



Don’t include it directly. The introjucer creates a local header file for your project called JuceHeader.h, which contains all the stuff you need. Look in the generated Main.cpp, etc. files to see it being included.


Thanks! That cleared it a lot!