Trying to compile FX plugin...new error on me...
-
SO Im trying to compile an FX project - it has C++ nodes (from airwindows) and ScriptNode nodes ... so Im getting this error set:
D:\Hise_Work\MultiFXTest_XXX\Binaries\JuceLibraryCode\JuceHeader.h(68,24): error C2374: 'ProjectInfo::projectName': redefinition; multiple initialization [D:\Hise_Work\MultiFXTest_XXX\Binaries\Builds\VisualStudio2022\ToyBox2_SharedCode.vcxproj] (compiling source file '../../../AdditionalSourceCode/nodes/factory.cpp') D:\Hise_Work\MultiFXTest_XXX\DspNetworks\Binaries\JuceLibraryCode\JuceHeader.h(49,24): see declaration of 'ProjectInfo::projectName' D:\Hise_Work\MultiFXTest_XXX\Binaries\JuceLibraryCode\JuceHeader.h(69,24): error C2374: 'ProjectInfo::companyName': redefinition; multiple initialization [D:\Hise_Work\MultiFXTest_XXX\Binaries\Builds\VisualStudio2022\ToyBox2_SharedCode.vcxproj] (compiling source file '../../../AdditionalSourceCode/nodes/factory.cpp') D:\Hise_Work\MultiFXTest_XXX\DspNetworks\Binaries\JuceLibraryCode\JuceHeader.h(50,24): see declaration of 'ProjectInfo::companyName' D:\Hise_Work\MultiFXTest_XXX\Binaries\JuceLibraryCode\JuceHeader.h(70,24): error C2374: 'ProjectInfo::versionString': redefinition; multiple initialization [D:\Hise_Work\MultiFXTest_XXX\Binaries\Builds\VisualStudio2022\ToyBox2_SharedCode. vcxproj] (compiling source file '../../../AdditionalSourceCode/nodes/factory.cpp') D:\Hise_Work\MultiFXTest_XXX\DspNetworks\Binaries\JuceLibraryCode\JuceHeader.h(51,24): see declaration of 'ProjectInfo::versionString' D:\Hise_Work\MultiFXTest_XXX\Binaries\JuceLibraryCode\JuceHeader.h(71,24): error C2374: 'ProjectInfo::versionNumber': redefinition; multiple initialization [D:\Hise_Work\MultiFXTest_XXX\Binaries\Builds\VisualStudio2022\ToyBox2_SharedCode. vcxproj] (compiling source file '../../../AdditionalSourceCode/nodes/factory.cpp') D:\Hise_Work\MultiFXTest_XXX\DspNetworks\Binaries\JuceLibraryCode\JuceHeader.h(52,24): see declaration of 'ProjectInfo::versionNumber'so "redefinition; multiple initialization "?? wha?
If I go look at D:\Hise_Work\MultiFXTest_XXX\Binaries\JuceLibraryCode\JuceHeader.h
I see this as the supposed offending code:
#if ! JUCE_DONT_DECLARE_PROJECTINFO namespace ProjectInfo { const char* const projectName = "ToyBox2"; const char* const companyName = "ChannelRobot"; const char* const versionString = "1.0.0"; const int versionNumber = 0x10000; }which seems odd...
Anyone got a clue?
-
@Lindon OK so its def. something to do with adding in the airwindows code ...as soon as I add in a single airwindows FX I get this problem... so I must be "doing it wrong"....
Has anyone had experience adding in an airwindows FX to their project?
Here's what Im doing....I will use Air2 as an example:
In my projects DspNetworks/ThirdParty adding in the air2.h header to define the link between HSE and the C++ so this is whats in there:
#pragma once #include "../Binaries/JuceLibraryCode/JuceHeader.h" #include "src/airwindows/AirWindows.h" namespace airwindows::air2_ns { JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE("-Wmultichar") #include "src/airwindows/Air2/Air2.h" #include "src/airwindows/Air2/Air2.cpp.inc" #include "src/airwindows/Air2/Air2Proc.cpp.inc" JUCE_END_IGNORE_WARNINGS_GCC_LIKE } // namespace airwindows::air2_ns namespace project { using namespace juce; using namespace hise; using namespace scriptnode; DECLARE_AIRWINDOWS_NODE(Air2, air2_ns); } // namespace projectThen I'm adding in the C++ code itself - so into:
....\DspNetworks\ThirdParty\src\airwindows\
I put AirWindows.h - which is the airwindows general code set...
Into
....\DspNetworks\ThirdParty\src\airwindows\Air2
I put the Air2 code files:

Ok now open the HISE project and run
Export>Compile DSP Networks
I see Air2 listed in my C++ files to compile:

I run this and it compiles the DLL fine.....
Now when I try and compile the project I get the errors above....
What am I doing wrong?
-
@Lindon yep this is wrong:
#pragma once #include "../Binaries/JuceLibraryCode/JuceHeader.h" #include "src/airwindows/AirWindows.h" namespace airwindows::air2_ns { JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE("-Wmultichar") #include "src/airwindows/Air2/Air2.h" #include "src/airwindows/Air2/Air2.cpp.inc" #include "src/airwindows/Air2/Air2Proc.cpp.inc" JUCE_END_IGNORE_WARNINGS_GCC_LIKE } // namespace airwindows::air2_ns namespace project { using namespace juce; using namespace hise; using namespace scriptnode; DECLARE_AIRWINDOWS_NODE(Air2, air2_ns); } // namespace projectif I edit it to look like this:
#pragma once #include <JuceHeader.h> #include "src/airwindows/AirWindows.h" namespace airwindows::air2_ns { JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE("-Wmultichar") #include "src/airwindows/Air2/Air2.h" #include "src/airwindows/Air2/Air2.cpp" #include "src/airwindows/Air2/Air2Proc.cpp" JUCE_END_IGNORE_WARNINGS_GCC_LIKE } // namespace airwindows::air2_ns namespace project { using namespace juce; using namespace hise; using namespace scriptnode; DECLARE_AIRWINDOWS_NODE(Air2, air2_ns); } // namespace project..and rename the extensions for the files in the src/airwindows/Air2/ folder I can build the DLL and also compile the project.
-
@HISEnberg - I suggest you edit your airwindows repo to fix this problem...
-
@Lindon hold on that might not be a fix....
-
@Lindon Ok false alarm, the above is the fix - I just needed to clean the Binaries folders for the networks and the plugin.
-
@Lindon Yes you spotted both of the main issues:
-
JuceHeadercollision. Previous versions used#include "../Binaries/JuceLibraryCode/JuceHeader.h"which was fine for the DLL, but exporting to VST3/AU caused the JuceHeaders (project info like companyName, versionString, etc.) to be pulled in twice. Solution is just to use#include <JuceHeader> -
.
cpp.incis resolved on all Fx to just.cpp(it was a leftover from the batch compile I ran). -
A handful of effects couldn't be compiled together — some of the amp/saturation nodes (the ones based on a shared
__Gain_Htemplate) and a few of the k-reverbs. Individually they were fine, but combining them caused build errors. It came down to a couple of effects accidentally reusing the same internal names behind the scenes, so they stepped on each other once everything compiled together. That's now sorted out, and the full set compiles as one.
The repo is up-to-date now and should be more stable.
-