I've been attempting to use WDL FFT to create a VST plug-in. It compiles fine when compiling for VST3, but fails to link when I try VST2, with the following error:
Code:
Error 1 error LNK2019: unresolved external symbol _WDL_fft referenced in function "public: virtual void __thiscall FFTest::ProcessDoubleReplacing(double * *,double * *,int)" (?ProcessDoubleReplacing@FFTest@@UAEXPAPAN0H@Z) G:\Development\Projects\VisualStudioProjects\wdl-ol\IPlugExamples\FFTest\FFTest.obj FFTest-vst2
I've created a sample project to demonstrate this, using duplicate.py with IPlugEffect as the basis, calling the new project "FFTest".
The only modifications I've made are to add "../../WDL/fft.h" and "../../WDL/fft.c" to the "base" solution, and at the top of FFTest.cpp, I've added #include "fft.h".
In addition, I've modified ProcessDoubleReplacing:
Code:
#define LEN 512
void FFTest::ProcessDoubleReplacing(double** inputs, double** outputs, int nFrames)
{
// Mutex is already locked for us.
WDL_FFT_COMPLEX arr[LEN];
WDL_fft(arr, LEN, 0);
}
Clearly it must be seeing fft.h, as everything compiles, even for VST2, so how could it not be seeing able to link this?
I can get it working if I add these two files directly to the VST2 solution, so it's not like I can't find a workaround, but I was under the impression that it would be better to add anything that should be shared between implementations to "base". Is that wrong?