# JUCE won't build - latest dev tip on XCode 11

**URL:** <https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581>\
**Category:** MacOSX and iOS\
**Created:** [April 9, 2020, 2:00pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581 "2020-04-09T14:00:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [April 9, 2020, 2:00pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/1 "2020-04-09T14:00:14Z")

</div>

Hi, getting this since pulling latest today:

Reference to Point is ambiguous

 ![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/9/9e7df546e40c80149be74bcefddf086fe2a2df7d.jpeg)

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [April 9, 2020, 2:05pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/2 "2020-04-09T14:05:16Z")

</div>

That is probably a duplicate of this thread:

> [@JUCE is busted in Xcode 11.4](https://forum.juce.com/t/juce-is-busted-in-xcode-11-4/38249/11):
>
> JUCE’s develop branch should now build with Xcode 11.4.

TL;DR it is fixed on develop

EDIT: sorry, I cannot read… you said you are using “dev tip”

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [April 9, 2020, 2:20pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/3 "2020-04-09T14:20:05Z")

</div>

yes, using dev - not fixed there…

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [April 9, 2020, 2:21pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/4 "2020-04-09T14:21:10Z")

</div>

I’m on XCode 11.2, which seems to be the latest available on Mohave

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 9, 2020, 2:32pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/5 "2020-04-09T14:32:54Z")

</div>

Please can you include the full error text so that I can see where the issue is coming from?

Also, are you able to repro this on any of the example projects, or does this only happen in your own code?

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [April 9, 2020, 3:13pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/6 "2020-04-09T15:13:03Z")

</div>

that is all the text, in the image.

i’ll try some example projects.

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [April 9, 2020, 3:16pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/7 "2020-04-09T15:16:26Z")

</div>

hi, ok so demorunner builds ok.

so it must be my projects.

any ideas? all I did was pull the latest…

---

<div class="post-metadata">

**Author:** ![instrumentMakers](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@instrumentMakers](https://forum.juce.com/u/instrumentMakers)\
**Post date:** [April 9, 2020, 3:16pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/8 "2020-04-09T15:16:41Z")

</div>

I had this too. Some new Apple library seems to have a Point class as well. I now use juce::Point instead of Point. This works fine.

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [April 9, 2020, 3:18pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/9 "2020-04-09T15:18:59Z")

</div>

i don’t actually directly use the Point class in any of my code so I’ve got none to change to juce::Point.

---

<div class="post-metadata">

**Author:** ![instrumentMakers](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@instrumentMakers](https://forum.juce.com/u/instrumentMakers)\
**Post date:** [April 9, 2020, 3:20pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/10 "2020-04-09T15:20:13Z")

</div>

Ah, maybe there was even a juce class, where I had to change it. Sorry, I can’t look this up, now. But you’re right this is not nice…

---

<div class="post-metadata">

**Author:** ![masshacker](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/masshacker/32/650_2.png) [@masshacker](https://forum.juce.com/u/masshacker)\
**Post date:** [April 9, 2020, 3:21pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/11 "2020-04-09T15:21:10Z")

</div>

This is why I always set the DONT\_SET\_USING\_JUCE\_NAMESPACE macro in my projects.  
“using namespace” should be banned.

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 9, 2020, 3:24pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/12 "2020-04-09T15:24:56Z")

</div>

For future reference, you can view the logs in a bigger window by clicking the ‘speech bubble’ button in the left toolbar (this is what it looks like with an artificial error):

 ![Screenshot 2020-04-09 at 16.16.26](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/a/a02c691d5d1450efc04d80c737424c21adcb673e.png)  
Then, if you click the ‘lines’ button on the right, you can see the full compiler invocation, and all the command output, in a selectable/copyable view.

To fix your problem, look for any places in your code where you’re including Mac framework headers, or other third-party headers before `JuceHeader.h`, and make sure JuceHeader.h is included first. If changing the include order doesn’t work, just add a `juce::` prefix to all the `Point` uses that the compiler complains about.

As @masshacker said, if you have some free time and want to avoid this kind of thing in the future, set `DONT_SET_USING_JUCE_NAMESPACE=1` in the preprocessor defs of your project and add explicit `juce::` namespaces everywhere.

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [April 9, 2020, 3:33pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/13 "2020-04-09T15:33:03Z")

</div>

adding JuceHeader.h everywhere where there’s a problem doesn’t work:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/e/ef4f7f725775776860052fa7ec21e9f99ecabe7d.png)

Not sure where I can change Point to juce::Point as this is just doing header preprocessing that causes the problem…

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 9, 2020, 3:40pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/14 "2020-04-09T15:40:49Z")

</div>

My best guess is that there’s a `using namespace juce;` somewhere before the include of `CoreMidi.h`, perhaps in `lmh_audio_app.h`, `lmh_midi.h`, or `lmh_Processor.h`. You could try grepping for `using namespace juce` in your custom modules and remove any uses that occur at global scope in headers.

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [April 9, 2020, 3:51pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/15 "2020-04-09T15:51:15Z")

</div>

ok, so I have a number of “using namespace directives” in my module header files.

So I should remove from the module header file and then go and individually add to every single header file I have? That’s obv alot of work so just want to make sure that that’s what you’re suggesting?

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 9, 2020, 3:56pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/16 "2020-04-09T15:56:23Z")

</div>

Yep, the most robust solution would be to remove `using namespace juce` from your module (or other) headers, and then to explicitly qualify any functions/types from juce headers with `juce::`.

It might also be that it’s possible to ‘fix’ this issue by adjusting your include order, so that CoreMIDI.h is included before any `using namespace juce` uses. This is not such great practice though, and if Apple or other third-party libraries add more identifiers at global scope in other headers, you might run into the same situation again.

Using `using namespace` before an `#include` will always lead to pain, and you should definitely avoid doing that. [Relevant Core Guidelines rule here](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#reason-394).

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [April 9, 2020, 4:00pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/17 "2020-04-09T16:00:50Z")

</div>

ok, just so I’m getting this right, from now on I have to qualify every use of any juce class with juce::, so I can’t write String anymore, I have to write juce::String everywhere…???

---

<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 9, 2020, 4:02pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/18 "2020-04-09T16:02:25Z")

</div>

That’s the best approach. It’s what I do in my non-juce projects.

But like Reuben said: the problem is that you’ve got a `using namespace` followed by including some random system header. That’s never going to be safe. If you _really really_ have to use `using namespace` then it MUST only be followed by your own code, and not by other 3rd party code that it could easily screw up.

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 9, 2020, 4:04pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/19 "2020-04-09T16:04:16Z")

</div>

> [@jules](#):
>
> If you _really really_ have to use `using namespace` then it MUST only be followed by your own code, and not by other 3rd party code that it could easily screw up.

And it’s not really possible to do this in a module header, because the modules get included in an unknown order in JuceHeader.h, and `using` statements in one module header might ‘leak’ and adversely affect the following headers.

So yeah, avoid `using namespace` in module headers.

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [April 9, 2020, 4:09pm UTC](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581/20 "2020-04-09T16:09:02Z")

</div>

what do you mean by non-juce projected? anything that isn’t core juce?

so any project I do is a non-juce project, and every time i ever use a juce class, enumeration or anything i need write an extra 6 characters of juce:: onto everything ? i thought namespaces were supposed to help use reduce the amount of typing we do as well as partition spaces, not cause us to write extra characters everytime we wan’t to use anything…

[Next page](https://forum.juce.com/t/juce-wont-build-latest-dev-tip-on-xcode-11/38581.md?page=2)
