Linker error when using JUCE classes in third party node template
-
Dear HISE community,
related to my first post, I have a couple more issues that I could use your help for.
I wanted to integrate a JUCE effect for which I have the c++ source code in the form of AudioProcessor.h/.cpp.
This code compiles and works with JUCE 7 and 8.Question 1. Will HISE be bumped to a more recent version of JUCE at some point?
For now, I created a backport for JUCE 6.
To integrate it into HISE, I followed the described procedure:
- Tools -> Create C++ third party node template
- I copied the AudioProcessor.cpp/.h file into the
src/
subdirectory. - I wrote glue code to actually use the code in the generated template.
- I included both AudioProcessor.cpp and AudioProcessor.h in the template file.
- I compile the code using Export -> Compile DSP networks as dll
Now the compilation works well, however the linking fails, indicating that code from juce::AudioProcessor has not been linked.
More precisely, no code seems to have been compiled for arm64 (I'm compiling a MacBook with Intel hardware, using XCode and MacOS Ventura).
Some other classes from JUCE compile and link without any problems.When I actually copy the definitions of the missing functions from JUCE (that comes with HISE) into the third party node template, the linker errors vanish.
(Please note, that I did not remove all linker errors since I do not consider that a solution to the problem, I just wanted to check if the deinitions are actually missing).Question 2. So I assume that the source files (at least containing juce::AudioProcessor) are not linked properly in the export sequence of HISE?
The last question assumes that some node with dials has been added to the DSP network.
Please also assume that HISE has beed compiled as VST3 plugin and is used in a DAW (I'm using FL Studio).Question 3: Is there a way to automate dials/sliders/... of HISE in the DAW? Again related to my first post, I wish to test the effect I'm designing right inside the DAW. (Afterall I assume that is the intended use-case of the plugin-version of HISE?)
Thank you very much in advance!
-
I might share a few more insights, maybe someone has an idea.
First, find an image of the aforementioned linker error below.
I assume that if I would compile the same thing on Apple Silicon, I would get a x86_x64 linking error.
Interestingly enough, when I export the HISE project containing the very same code as FX plugin (using the export functionality in HISE), I do not get linker errors.
Any idea?
-
Update:
I tested the same workflow on Windows and encoutered the same problem (linker errors). This made me investigate a little more and I found the reasons for the linker error:
- I have another installation of JUCE (v. 8.0.0) that may have overriden the module paths. I had to make sure that the module is set to the version shipped with HISE.
- The
AutogeneratedProject.jucer
that is generated does not include the "juce_audio_processors" module. Add it and it works, on both mac and Windows.
I don't know why this choice was made and if there is a way in the UI of HISE to change which modules are included in the auto generated project.
Alternatively, if someone could point me to where I have to modify the source code of HISE would great! Maybe that is quickly done by @Christoph-Hart ?Otherwise, exporting the plugin using the HISE interface will overwrite the project each time and I have to add the module again and again.
-
Found the file:
hi_backend/backend/ProjectDllTemplate.cpp