COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 01-25-2016, 11:57 AM   #1
Crazy Eye Joe
Human being with feelings
 
Join Date: Jan 2016
Posts: 6
Default Newbie question for WDL-OL: WDL FFT linker error in VST2, but not in VST3

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?
Crazy Eye Joe is offline   Reply With Quote
Old 01-25-2016, 02:20 PM   #2
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

Have you added the fft.c file to the VST2 project? I always forget to add the .c/.cpp files to all of the plugin projects, so that is my first guess.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 01-25-2016, 03:15 PM   #3
Crazy Eye Joe
Human being with feelings
 
Join Date: Jan 2016
Posts: 6
Default

I added it to the "base" project (both .h and .c). This works for VST3.

If I add it to the VST2 project, it compiles and links, so that's one way to do it, but shouldn't it be enough to add it to "base"? Isn't that what would be considered good practice anyway?

I'm just trying to understand the good practice way to do it, rather than just getting it to compile.
Crazy Eye Joe is offline   Reply With Quote
Old 01-26-2016, 12:29 AM   #4
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

AFAIK base is only used for VST3.
Tale is offline   Reply With Quote
Old 01-26-2016, 05:10 AM   #5
Crazy Eye Joe
Human being with feelings
 
Join Date: Jan 2016
Posts: 6
Default

I see, that explains it all. Thanks!
Crazy Eye Joe is offline   Reply With Quote
Old 02-02-2016, 07:29 AM   #6
sstillwell
Human being with feelings
 
Join Date: Jul 2006
Location: Cowtown
Posts: 1,562
Default

Quote:
Originally Posted by Tale View Post
AFAIK base is only used for VST3.
Correct, 'base' is actually part of the VST3 SDK if I recall correctly. You probably don't want to modify it there. Add the code to each of your subprojects in the solution. I think I responded to this in another thread with a more detailed explanation - hopefully that will help.
__________________
https://www.stillwellaudio.com/
sstillwell is offline   Reply With Quote
Old 11-21-2018, 05:25 AM   #7
k.d.iv
Human being with feelings
 
Join Date: Mar 2018
Posts: 28
Default

It's an old post, but yes... as @random_id said you need to add fft.c file to your project.
On Visual Studio 15 right click on MyPlugin-vst ... Add Existing file..
navigate to folder WDL , select the file fft.c and hit OK. Also same for the other projects.
k.d.iv is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.