No flock.cpp in VST SDK?

It’d seem I found the breaking commit:

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:

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? :slight_smile:

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

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

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.


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

using namespace juce;

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

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.

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

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.

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

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.

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.

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!

You got me worried there for a moment :wink:

It’s possible that this issue is hitting those people who download JUCE from the zipped file here:

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


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 ?

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

I think the user expected a prominent entry in BREAKING_CHANGES.txt, when master was updated and required a VST SDK update.
And I think it is not there, because when updating it was not clear, that the SDK was not backward compatible, which created the problem of this thread and several others in the first place.

1 Like

Yes indeed. But the work on master isn’t finalized in a tagged version.
Products relies on tagged versions.
Moreover it seems that some VST3 3.6.8 fixes are available on develop but not available up till now on master ?

and it still is giving problems to date: E1696 cannot open source file "stddef.h"

Hey guys,

sorry to revive this somewhat old thread, but I’m running into similar issues.

I just now downloaded the latest JUCE from the website (not from Git).

The AudioPluginHost fails to compile (missing flock.cpp) with both the newest VST SDK (3.6.10) as well as an older version I had on another computer (3.6.6).

What is the official workaround at the moment? Get the latest JUCE from Github and/or try to get the VST SDK V3.6.8?

If I decide that I’m not currently interested in VST3 and just want to use the AudioPluginHost to debug VST2 plugins, after going into the project’s juce_audio_processors settings with the Projucer and setting JUCE_PLUGINHOST_VST3 to “Disabled”, it still fails to compile:

1>------ Neues Erstellen gestartet: Projekt: AudioPluginHost_App, Konfiguration: Debug Win32 ------
1>  FilterGraph.cpp
1>  FilterIOConfiguration.cpp
1>  InternalFilters.cpp
1>  GraphEditorPanel.cpp
1>  MainHostWindow.cpp
1>  HostStartup.cpp
1>  BinaryData.cpp
1>  include_juce_audio_basics.cpp
1>  include_juce_audio_devices.cpp
1>  include_juce_audio_formats.cpp
1>..\..\Source\UI\MainHostWindow.cpp(85): error C2143: Syntaxfehler: Es fehlt ']' vor '='
1>..\..\Source\UI\MainHostWindow.cpp(85): error C3481: "safeThis": Es wurde keine Lambdaerfassungsvariable gefunden.
1>..\..\Source\UI\MainHostWindow.cpp(85): error C2059: Syntaxfehler: ']'
1>..\..\Source\UI\MainHostWindow.cpp(85): error C2059: Syntaxfehler: '='
1>..\..\Source\UI\MainHostWindow.cpp(85): error C3493: "this" kann nicht implizit erfasst werden, da kein Standarderfassungsmodus angegeben wurde.
1>..\..\Source\UI\MainHostWindow.cpp(86): error C2143: Syntaxfehler: Es fehlt ';' vor '{'
1>..\..\Source\UI\MainHostWindow.cpp(90): error C2065: 'safeThis': nichtdeklarierter Bezeichner
1>..\..\Source\UI\MainHostWindow.cpp(90): error C2227: Links von "->deviceManager" muss sich ein Zeiger auf Klassen-/Struktur-/Union-/generischen Typ befinden.
1>          Typ ist 'unknown-type'

Among other issues, it does not recognize the variable ‘safeThis’ in MainHostWindow::MainHostWindow().

Any idea what is going on there?

Thank you in advance.

EDIT: just for info, working on Visual Studio 2013

This thread is hugely out of date now - for the last few months, JUCE has included all the VST 2 + 3 SDKs internally, so there’s no need to download the SDK yourself at all. Just get the latest version from git (always use the develop branch to get the latest stuff) and you can get rid of any copies of the SDK that you might have been using yourself.