I’m trying to create my own effect but I’m having trouble building. I’m relatively new to coding so I’m not sure what’s missing. I’m on MacOS using VSCode. Here’s my situation:
Set up DaisyExamples, created new folder “MXNHLT” inside, able to create new files with helper script and run basic “hello world” from here.
Using DaisySP/Source/Effects/flanger for testing. Copied contents of seed/DSP/Flanger example into DaisyExamples/MXNHLT after creating new folder in this location with helper.py. Able to build/run this duplicated file from here. Renamed “Flanger2Test”.
In DaisySP folder, duplicated flanger.cpp and flanger.h, renamed “flanger2”. Included flanger2.h in “daisysp.h” and changed #ifndef/#define at the top, renamed class “Flanger2”.
In flanger2.cpp, update to #include flanger2.h, rename all functions to “Flanger2::” etc.
Change Flanger objects in MXNHLT/Flanger2Test.cpp to Flanger2, VSCode recognizes the class.
Here is the main problem:
Before changing to Flanger2 class, build_and_program_dfu works. After changing, there are several errors in the form of:
"/MXNHLT/Flanger2Test/Flanger2Test.cpp:33: undefined reference to `daisysp::Flanger2::Process(float)’
I can get the build to work just by changing Flanger2 back to Flanger.
As far as I can tell I’ve duplicated/updated the names in all of the necessary files, VSCode doesn’t see any problems, but it still won’t build. I’d be very grateful for some guidance on how to do this properly, and if my file organization is good form, e.g. if I should be putting new source files elsewhere.