VST2 (Win) compilation broken with latest Projucer

Hello team!

Just to let you know, a project that was saved with the Projucer built from the dev tip fails to compile VST2.
Didn’t dig too deep, as reverting to 5.0.1 Projucer works correctly for me, but the configuration was:

Windows 10 x64
Projucer x64 built from commit 919e3e36ec06c8a09c163c50d8c9cdf43aca00d5 [919e3e3], Release x64 build with VS2013
VST2 project of the plugin, VS2013 exporter (using it with VS2017)

It fails with:
juce_audio_processors/format_types/juce_VSTCommon.h(183): error C2070: ‘unknown’: illegal sizeof operand

So the VST2 of the plugin won’t compile, all the other formats compiled nicely.

Cheers! :slight_smile:
Olli

I really can’t seem to reproduce this. Can you try this with the juce demo plugin? I understand that there may be something wrong with the code it’s complaining about (as that code is new), but I don’t see how any of the recent Projucer changes could make this error appear.

Hi fabian,

Thanks for having a look!
The problem appeared suddenly, and it took me several hours of battling to get it building again. It seemed to have to do with Juce commit as well as version of Projucer, but I’m not sure what combination of tries finally fixed it.

I’m currently running 5.0.1 with cherrypicked fixes, and since it seems to be working for me for now I’m trying not to touch it. If no one else is having this issue, it’s likely that a byte has turned sideways somewhere on my build system. I’ll get back this later after I get a release out.

Thanks!

Got the same here when I tried the latest tip and VS 2013
Tried compiling the plugin host demo
And got this:

Error 4 error C2070: ‘unknown’: illegal sizeof operand (…\JuceLibraryCode\include_juce_audio_processors.cpp) c:\users\xx\juce_lib\modules\juce_audio_processors\format_types\juce_VSTCommon.h 183 1 Plugin Host_App

When I double click the error it takes me to line 183 of juce_VSTCommon.h:

Around here:

private:
JUCE_LEAK_DETECTOR (VstSpeakerConfigurationHolder)

    HeapBlock<VstSpeakerConfiguration> storage;
    VstSpeakerConfiguration* allocate (int numChannels)
    {

This lne—> auto arrangementSize = (sizeof (VstSpeakerConfiguration) - sizeof(VstSpeakerConfiguration::speakers))
+ (sizeof (VstIndividualSpeakerInfo) * static_cast<size_t> (numChannels));

        storage.malloc (1, arrangementSize);
        return storage.getData();
    }
    void clear()
    {
        VstSpeakerConfiguration& dst = *allocate (0);
        dst.type = vstSpeakerConfigTypeEmpty;
        dst.numberOfChannels = 0;
    }
};
1 Like

I tried changing to the latest tip again today, with no success.
I get exactly the same error as you.

I did some more testing, the problem doesn’t seem to be in Projucer. It compiled neatly with the Projucer from the latest tip, but I had to revert JUCE modules back to the 5.0.1 + cherrypicked fixes to get the build working.

Hi
Good to hear I’m not alone, since I also have some tweaks in my juce, I tried just downloading a complete Zip file from github, and then used latest binary Projucer. Same thing.
Could it be a VS2013 thing?
Edit: same setup compiles fine on OSX/Xcode

1 Like

I reckon it is most likely something in VS2013. I’m running VS2013 exporter with VS2017 to get debugging to work.

Why not use the VS2017 exporter ?

Last I checked, I wasn’t able to get the AAX lib to compile with it. Avid still hasn’t provided anything newer than VS2013 project for that. :slight_smile:

Strange, I compiled the project with 2017. So it’s an issue with the obfuscation process? Because you still need to have the 2013 compilers for this project.

1 Like

Did you get it to change the toolkit to 140 (or similar)? I’ve built it with VS2017 as well, but using v120 toolchain.
I haven’t been able to get the AAX SDK to compile with anything newer than v120, so been sticking with that.
I’d be thrilled to hear a fix for the AAX problem! :smiley:

I think I compiled it with 2017 without changing anything (or perhaps just the runtime). But then, I haven’t tried running the plugin on PT, as I don’t have a version.

Can you test if this commit fixes the compiler error in VS2013?

@fabian Compiles just fine for me in VS2013 now after the fix
Thank you for sorting it out!