# Both host and plugin statically linked with JUCE

**URL:** <https://forum.juce.com/t/both-host-and-plugin-statically-linked-with-juce/8374>\
**Category:** MacOSX and iOS\
**Created:** [March 28, 2012, 9:14am UTC](https://forum.juce.com/t/both-host-and-plugin-statically-linked-with-juce/8374 "2012-03-28T09:14:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![etienne](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@etienne](https://forum.juce.com/u/etienne)\
**Post date:** [March 28, 2012, 9:14am UTC](https://forum.juce.com/t/both-host-and-plugin-statically-linked-with-juce/8374/1 "2012-03-28T09:14:18Z")

</div>

Hello,

I have both a host application and a dylib plugin statically linked with JUCE 1.53.

Compiling them with -fvisibility=hidden isn’t enough as all “@interface” in the juce\_mac specific implementations aren’t hidden, thus resulting in dlopen to fail.

Is there a method to hide those “@interface” to the host?

---

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [March 28, 2012, 9:33am UTC](https://forum.juce.com/t/both-host-and-plugin-statically-linked-with-juce/8374/2 "2012-03-28T09:33:56Z")

</div>

Obj C stuff needs to be prefixed. Unfortunately, there is no two-level namespace

---

<div class="post-metadata">

**Author:** ![etienne](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@etienne](https://forum.juce.com/u/etienne)\
**Post date:** [March 29, 2012, 2:21pm UTC](https://forum.juce.com/t/both-host-and-plugin-statically-linked-with-juce/8374/3 "2012-03-29T14:21:52Z")

</div>

Thanks, prefixing all the defined interfaces with “\_” did the trick; even though I have to build juce twice with different native code.

---

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [March 29, 2012, 2:24pm UTC](https://forum.juce.com/t/both-host-and-plugin-statically-linked-with-juce/8374/4 "2012-03-29T14:24:03Z")

</div>

can’t you use JUCE\_ObjCExtraSuffix ?

---

<div class="post-metadata">

**Author:** ![etienne](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@etienne](https://forum.juce.com/u/etienne)\
**Post date:** [March 29, 2012, 2:35pm UTC](https://forum.juce.com/t/both-host-and-plugin-statically-linked-with-juce/8374/5 "2012-03-29T14:35:34Z")

</div>

I wasn’t aware of that define; that could have saved me some modifications.

I guess the result would be more or less the same.

Nevertheless, I’ll keep that in mind for future juce upgrades. Thanks.
