Forum
    • Categories
    • Register
    • Login

    Trying to compile FX plugin...new error on me...

    Scheduled Pinned Locked Moved General Questions
    7 Posts 2 Posters 65 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LindonL
      Lindon
      last edited by

      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?

      HISE Development for hire.
      www.channelrobot.com

      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @Lindon
        last edited by

        @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 project
        

        Then 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:

        dc8c863d-ed7f-49cf-9b32-5d878357bfc9-image.png

        Ok now open the HISE project and run

        Export>Compile DSP Networks

        I see Air2 listed in my C++ files to compile:

        f9fec1fa-1ef3-4088-ae50-efd8b07ab49e-image.png

        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?

        HISE Development for hire.
        www.channelrobot.com

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @Lindon
          last edited by

          @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 project
          

          if 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.

          HISE Development for hire.
          www.channelrobot.com

          LindonL 1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon @Lindon
            last edited by

            @Lindon

            @HISEnberg - I suggest you edit your airwindows repo to fix this problem...

            HISE Development for hire.
            www.channelrobot.com

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @Lindon
              last edited by

              @Lindon hold on that might not be a fix....

              HISE Development for hire.
              www.channelrobot.com

              LindonL 1 Reply Last reply Reply Quote 0
              • LindonL
                Lindon @Lindon
                last edited by Lindon

                @Lindon Ok false alarm, the above is the fix - I just needed to clean the Binaries folders for the networks and the plugin.

                HISE Development for hire.
                www.channelrobot.com

                HISEnbergH 1 Reply Last reply Reply Quote 1
                • HISEnbergH
                  HISEnberg @Lindon
                  last edited by

                  @Lindon Yes you spotted both of the main issues:

                  1. JuceHeader collision. 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>

                  2. .cpp.inc is resolved on all Fx to just .cpp (it was a leftover from the batch compile I ran).

                  3. A handful of effects couldn't be compiled together — some of the amp/saturation nodes (the ones based on a shared __Gain_H template) 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.

                  Sonic Architect && Software Mercenary

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  11

                  Online

                  2.4k

                  Users

                  13.8k

                  Topics

                  120.0k

                  Posts