Issue creating a c++ script fx node with multiples .h files
-
@Papours would it make a difference if you use
#include <test_filter.h>in the cpp instead of
#include "test_filter.h" -
@Papours You might also need to set the search path for
srcin your VS project so it knows where to look for dependencies. I know it's the case in XCode but I don't know VS... -
@ustk Hi, thanks for the reply !
I tried a lot of different ways to import my file. I tried to change the quotes to "<" ">", I tried to add a "./" at the beginning and a mix of the two. Nothing changed my issue. I don't think the issue is with the way I include my file, since the c++ linter has no issues finding my file.I'm not sure what the equivalent of "search path" is for visual studio, but I tried to dig into the project settings and add the global path to my src folder everywhere I tought could be the equivalent.
So I added the path to my src in :- executable directory
- Include directory
- External include directory
- Reference directory
- Library directory
- Win RT directory
- Source directory
After adding my path everywere (but not adding the external file directly as i did in the video), I still had the linker error.
That being said, I don't think not having the error would have solver my issue, because I think the root of my problem is that hise is re-generating the visual studio project every time I trie to compile a dll, vst or standalone app, so I'm not sure if the solution is inside visual studio.
-
@Papours Another frustrating thing is that if I manually add my external dependency in vscode, then build as release, then open hise, in tool > Show DSP network DLL info, it says that my DLL is working fine
.However, when exporting my hise project, it tried to re-build everything and fail :(
-
@Papours Sorry I missed your reply.
Have you tried using an absolute instead of a relative path here:
#include "src/test_filter.h"I've noticed that VS can be kind of finicky about paths sometimes. So in this case for windows it will look like:
("C:\\path\\to\\file\\src\test_filter.h")This isn't an ideal solution but it might help solving if the compiler is failing to find the file or not....
-
@HISEnberg Hey, it's ok, you're answering pretty fast even when missing my reply ^^
I did try to use an absolute path, I still had the same issue : I can build the project inside visual studio after adding the .h and .cpp files manually, but can't export my project from hise

I don't think the issue is with the #include since I can build my project from visual studio code
-
@Papours Hmm maybe try running the HISE project directly in VS.
So go through this whole procedure, but instead of compiling the Standalone in HISE, go to Project Name/Binaries/Builds/VisualSudio2022 and launch the project directly from there.
You can get a lot more useful information from the compiler that way.
-
When launching the project directly from there, I get the same linker 2019 error as from when launching from dspNetwork.

If I add my external dependency directly (right click on the project > add > existing element), I can generate a standalone app from there

But then if I reopen hise and try to export my project as a vst (which is my final goal), I get the same linker error.
-
@Papours OH
However, if before opening the visual studio project in "project name/binaries/build" I try in hise to make a VST, the project there is trying to make a VST.
Doing the same dance of adding my external files and building from there do generate my VST.
So that solves my issue, thanks !
-
-
@Papours Nice glad you solved this!
