# No flock.cpp in VST SDK?

**URL:** <https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069>\
**Category:** Audio Plugins\
**Created:** [November 9, 2017, 3:04pm UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069 "2017-11-09T15:04:55Z")\
**Posts on this page:** 20\
**Page:** 2

<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:** [November 22, 2017, 3:20pm UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/21 "2017-11-22T15:20:08Z")

</div>

For me I always left it as Compiler default, after a long struggle with C++11, that was affected, when I tried to use something else… especially when linking to the AAX library. Since then I never had any problem, I can support back to 10.7 easily by setting the deployment target (haven’t tried 10.6, but I think it is old enough to forget about it… that was the time point when there were architecture changes, so that was for me reason enough to not bother about \<10.7)

For that topic have a look at: [What's the earliest OS people are compiling for?](https://forum.juce.com/t/whats-the-earliest-os-people-are-compiling-for/25112)

HTH

---

<div class="post-metadata">

**Author:** ![ollierikkeskinen](https://avatars.discourse-cdn.com/v4/letter/o/919ad9/32.png) [@ollierikkeskinen](https://forum.juce.com/u/ollierikkeskinen)\
**Post date:** [November 22, 2017, 3:22pm UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/22 "2017-11-22T15:22:47Z")

</div>

Ok! Thank you for that nugget of information, I’ll look into it!

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [November 22, 2017, 3:44pm UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/23 "2017-11-22T15:44:17Z")

</div>

Another issue with vst 3.6.8 has been solved with commit [57d7e98](https://github.com/WeAreROLI/JUCE/commit/57d7e98053580bdefa2824a6ec2af40f2025d269) on develop.

@ollierikkeskinen Hmmm, are you sure you are seeing those errors with the latest XCode and a deployment target of 10.10? I can’t seem to reproduce the errors you are seeing.

---

<div class="post-metadata">

**Author:** ![grhn](https://avatars.discourse-cdn.com/v4/letter/g/f08c70/32.png) [@grhn](https://forum.juce.com/u/grhn)\
**Post date:** [November 24, 2017, 4:03pm UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/24 "2017-11-24T16:03:29Z")

</div>

I get identical errors with @ollierikkeskinen when trying to use develop or master tip, 5.1.1 is the latest version I’m able to get link VST3 correctly.

My OS X dev configuration is:

- OS X Sierra
- Xcode 8.3
- 10.10 SDK
- deployment target 10.7
- VST SDK 3.6.7

I also tried VST SDK 3.6.8, 10.12 SDK and deployment target 10.10 and their different permutations (cleaning and re-exporting the project with Projucer between each attempt), but no luck.

---

<div class="post-metadata">

**Author:** ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)\
**Post date:** [November 27, 2017, 10:27am UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/25 "2017-11-27T10:27:58Z")

</div>

I’m also struggling to reproduce those errors. Are you including any JUCE headers in an unconventional way?

---

<div class="post-metadata">

**Author:** ![ollierikkeskinen](https://avatars.discourse-cdn.com/v4/letter/o/919ad9/32.png) [@ollierikkeskinen](https://forum.juce.com/u/ollierikkeskinen)\
**Post date:** [December 8, 2017, 4:09pm UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/26 "2017-12-08T16:09:08Z")

</div>

It’d seem I found the breaking commit:

```
eda613c6db698f31ab2189cc289c9de2db821142
Moved all "namespace juce" declarations from module headers to individual .h and .cpp source files. This makes life a lot easier for Intellisense and other IDE autocompletion tools.

```

After this, the following function in juce\_VST3\_Wrapper.cpp starts to fire namespace errors:  
`JUCE_EXPORTED_FUNCTION IPluginFactory* PLUGIN_API GetPluginFactory()`

The juce namespace scope ends before this function. When moving it to after the function, everything seems to compile neatly with latest tip as well. So that is hopefully the fix, could you check this? 🙂

---

<div class="post-metadata">

**Author:** ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)\
**Post date:** [December 8, 2017, 4:39pm UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/27 "2017-12-08T16:39:36Z")

</div>

I’m pretty sure we don’t want that function in the JUCE namespace. Do VST3 plug-ins still load correctly with that change?!

---

<div class="post-metadata">

**Author:** ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)\
**Post date:** [December 8, 2017, 4:44pm UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/28 "2017-12-08T16:44:23Z")

</div>

Can you reproduce this issue with any of the JUCE example projects?

---

<div class="post-metadata">

**Author:** ![ollierikkeskinen](https://avatars.discourse-cdn.com/v4/letter/o/919ad9/32.png) [@ollierikkeskinen](https://forum.juce.com/u/ollierikkeskinen)\
**Post date:** [December 13, 2017, 10:33am UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/29 "2017-12-13T10:33:21Z")

</div>

Hi Tom,

Thank you for looking into this!

I did further checking. VST3 plugins loaded correctly with the change of the namespace, but that probably is not the culprit here.

We have set the JUCE\_VST3\_CAN\_REPLACE\_VST2=0. When switching this to 1, VST3 compiles, when 0, it doesn’t. I was able to reproduce the issue with JuceDemoPlugin, with the XCode exporter.

The reason for using this flag is that without it, some hosts replace VST2 with VST3, and then mishandle the VST3 version. VST3 seems to be trickier to implement, and since VST2 is solid, this at least gives the customers a plugin that they can work with.

Thanks!  
Olli

---

<div class="post-metadata">

**Author:** ![grhn](https://avatars.discourse-cdn.com/v4/letter/g/f08c70/32.png) [@grhn](https://forum.juce.com/u/grhn)\
**Post date:** [December 13, 2017, 10:49am UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/30 "2017-12-13T10:49:10Z")

</div>

Probably not the correct way to address this, but by adding

```auto
#if ! DONT_SET_USING_JUCE_NAMESPACE
using namespace juce;
#endif

```

just before opening the juce namespace in juce\_VST3\_Wrapper.cpp I was able to get VST3 compile without errors with JUCE\_VST3\_CAN\_REPLACE\_VST2=0.

EDIT: tested with develop commit 202cad899124d576293d3d7a6fbdebc69379f5af

---

<div class="post-metadata">

**Author:** ![grhn](https://avatars.discourse-cdn.com/v4/letter/g/f08c70/32.png) [@grhn](https://forum.juce.com/u/grhn)\
**Post date:** [December 13, 2017, 10:55am UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/31 "2017-12-13T10:55:54Z")

</div>

juce\_VSTInterface.h seems to begin with

`using namespace juce;`

and that header is included only if JUCE\_VST3\_CAN\_REPLACE\_VST2 flag is set.

---

<div class="post-metadata">

**Author:** ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)\
**Post date:** [December 14, 2017, 12:17pm UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/32 "2017-12-14T12:17:44Z")

</div>

Yep. Restoring `using namespace juce` is the way to go here. I’ll push a fix to the develop branch shortly.

> [@ollierikkeskinen](#):
>
> VST3 plugins loaded correctly with the change of the namespace

Did you try on Windows? I’m pretty sure that there the namespacing will change the signatures of the VST3 entry points. I suppose it’s a bit of a moot point now anyway.

---

<div class="post-metadata">

**Author:** ![ondeorange](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@ondeorange](https://forum.juce.com/u/ondeorange)\
**Post date:** [January 16, 2018, 10:57am UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/33 "2018-01-16T10:57:19Z")

</div>

Thanks so much, it’s been a hassle to find 3.6.7, which is the only way it seems to make the latest JUCE Plugin Host to compile

---

<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:** [January 16, 2018, 11:04am UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/34 "2018-01-16T11:04:03Z")

</div>

I really don’t know why this seems to be creating so much confusion, but please don’t make it worse by recommending that anyone gets 3.6.7!

The situation is very simple: The **latest** JUCE codebase (i.e. what you get from Github) works with the **latest** VST SDK (i.e. 3.6.8).

We don’t recommend using older VST SDKs or older JUCE versions.

---

<div class="post-metadata">

**Author:** ![PixelPacker](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pixelpacker/32/9869_2.png) [@PixelPacker](https://forum.juce.com/u/PixelPacker)\
**Post date:** [January 16, 2018, 11:19am UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/35 "2018-01-16T11:19:09Z")

</div>

AFAIK, because the function is extern “c” (JUCE\_EXPORTED\_FUNCTION) you don’t need to worry if it is inside the namespace or not from the linkers perspective. And there’s a good chance it was inside the namespace before. So I’d leave it in there.

---

<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:** [January 16, 2018, 11:22am UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/36 "2018-01-16T11:22:35Z")

</div>

> [@pixelpacker](#):
>
> AFAIK, because the function is extern “c” (JUCE\_EXPORTED\_FUNCTION)

JUCE\_EXPORTED\_FUNCTION is not the same as extern “C”. The two things are very different…

EDIT: nope, sorry, I take that back! They used to be very different, but apparently that’s no longer true!

---

<div class="post-metadata">

**Author:** ![PixelPacker](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pixelpacker/32/9869_2.png) [@PixelPacker](https://forum.juce.com/u/PixelPacker)\
**Post date:** [January 16, 2018, 11:32am UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/37 "2018-01-16T11:32:58Z")

</div>

You got me worried there for a moment 😉

---

<div class="post-metadata">

**Author:** ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)\
**Post date:** [January 16, 2018, 3:32pm UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/38 "2018-01-16T15:32:11Z")

</div>

> [@jules](#):
>
> I really don’t know why this seems to be creating so much confusion,
> 
> […]
> 
> The situation is very simple: The latest JUCE codebase (i.e. what you get from Github) works with the latest VST SDK (i.e. 3.6.8).

It’s possible that this issue is hitting those people who download JUCE from the zipped file here: [Download - JUCE](https://juce.com/get-juce/download)

To outsiders, it’s very likely that the zipped file feels like the “stable” release whereas anything on GitHub feels like “under development”

---

<div class="post-metadata">

**Author:** ![loic](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/loic/32/3748_2.png) [@loic](https://forum.juce.com/u/loic)\
**Post date:** [January 31, 2018, 10:20am UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/39 "2018-01-31T10:20:53Z")

</div>

The situation isn’t that simple : my company buy Juce to release audio plugins, hence when we release a product we MUST provide the maintenance and the capability to ensure built stability and reproductibility. To achieve these goals, a product must depend upon well known released and tested software versions.

As is, the Juce master branch is used to fix bugs, hence development cycles occur on develop and on master.  
There are no bugfix, feature or release branch to host for instance VST 3.6.8 integration.  
If this was the case, this feature branch for VST 3.6.8 could have been created from Juce 5.2.0 and merged both in develop, a release branch to test the feature.

Upon succesfull testing on the release branch it could have been merged in master then tagged.

With the current versioning and development process used in Juce git, we need to rely on well tested tags.  
In this situation, can you provide a date for the next Juce release, as we have an audio plugin that needs VST3.6.8 as some bugs are fixed within this version ?

---

<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:** [January 31, 2018, 10:30am UTC](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069/40 "2018-01-31T10:30:21Z")

</div>

> [@loic](#):
>
> In this situation, can you provide a date for the next Juce release, as we have an audio plugin that needs VST3.6.8 as some bugs are fixed within this version ?

Maybe I don’t quite understand the problem… AFAIK the 3.6.8 update has been available on the master branch since November?

[Previous page](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069.md?page=1)

[Next page](https://forum.juce.com/t/no-flock-cpp-in-vst-sdk/25069.md?page=3)
