# The "Component is ambiguous" error comes in JUCE 2.0

**URL:** https://forum.juce.com/t/the-component-is-ambiguous-error-comes-in-juce-2-0/8536
**Category:** MacOSX and iOS
**Created:** [April 21, 2012, 4:08am UTC](https://forum.juce.com/t/the-component-is-ambiguous-error-comes-in-juce-2-0/8536 "2012-04-21T04:08:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ioue](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ioue/32/127_2.png) [@ioue](https://forum.juce.com/u/ioue)
#### Post date: [April 21, 2012, 4:08am UTC](https://forum.juce.com/t/the-component-is-ambiguous-error-comes-in-juce-2-0/8536/1 "2012-04-21T04:08:02Z")

</div>

I’m trying to use JUCE 2.0 in my project in which I used JUCE v1.5X.  
Juce 2.0 is very good but I had to tweak lots of stuff 🙂 … and I could not complete to build it yet because of the “Component is ambiguous” error ☹  
I know I can escape from this error by including Carbon header before including juce headers. So I’m used to insert Carbon in my precompiled header. But this does not work with JUCE 2.0…

Well guys, do you have this kind of troubles when updating your project to JUCE 2.0??

For example, I cannot even compile JuceDemo when inserting this kind of line:

```auto
 CFStringRef pCFStrUserName = CSCopyUserName(true);
```

I don’t know where I should include \<Carbon/Carbon.h\>…

---

<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 21, 2012, 8:53am UTC](https://forum.juce.com/t/the-component-is-ambiguous-error-comes-in-juce-2-0/8536/2 "2012-04-21T08:53:57Z")

</div>

You really should drop carbon - Apple have deprecated it, you won’t be able to use it in 64-bit builds or on the next release of OSX. And there’s certainly no reason to use old functions like CSCopyUserName, you should use cocoa functions instead, or SystemStats::getFullUserName().

But if you search the codebase for places where I’ve included carbon.h, you’ll see some tricks you can copy to make it work.

---

<div class="post-metadata">

### Author: ![ioue](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ioue/32/127_2.png) [@ioue](https://forum.juce.com/u/ioue)
#### Post date: [April 22, 2012, 7:17am UTC](https://forum.juce.com/t/the-component-is-ambiguous-error-comes-in-juce-2-0/8536/3 "2012-04-22T07:17:25Z")

</div>

Hi Jules,

Thanks, I could build my project by CarbonDummyComponentName tricks.  
But you’re right, I have to migrate my proj from Carbon to Cocoa…
