# Compiling and adding files in XCode

**URL:** <https://forum.juce.com/t/compiling-and-adding-files-in-xcode/6713>\
**Category:** MacOSX and iOS\
**Created:** [April 14, 2011, 9:49am UTC](https://forum.juce.com/t/compiling-and-adding-files-in-xcode/6713 "2011-04-14T09:49:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergex](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sergex](https://forum.juce.com/u/Sergex)\
**Post date:** [April 14, 2011, 9:49am UTC](https://forum.juce.com/t/compiling-and-adding-files-in-xcode/6713/1 "2011-04-14T09:49:45Z")

</div>

Hello,

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!

Thanks

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [April 14, 2011, 10:33am UTC](https://forum.juce.com/t/compiling-and-adding-files-in-xcode/6713/2 "2011-04-14T10:33:29Z")

</div>

> [@](#):
>
> For example #include “juce.h” doesn’t work

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.

---

<div class="post-metadata">

**Author:** ![Sergex](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sergex](https://forum.juce.com/u/Sergex)\
**Post date:** [April 14, 2011, 12:52pm UTC](https://forum.juce.com/t/compiling-and-adding-files-in-xcode/6713/3 "2011-04-14T12:52:39Z")

</div>

Thanks! That cleared it a lot!
