I am trying to create a spectral processing plugin and I have almost completely installed the FFTW library using the precompiled version and a tutorial from this site. I have made it down to the very last step, but I don’t think I can do it properly. They suggest to load the .dll files into the output directory where the .exe file is located, but I do not have that ability when I am exporting a .vst3 file. The plugin compiles, but when I try to open the plugin in FL Studio, I get an error that the plugin could not load, and to make sure it was installed correctly. I tried loading the .dll files into the vst3 directory where the plugin is created with no luck. Is it possible to compile my plugin so that loading the .dll files somewhere else is unnecessary? If not, where should I move the .dll files so that the plugin loads correctly?
Linking audio plugins (which are DLLs themselves) with other DLLs is a PITA. If you can build a static library version of FFTW, that would be a better solution in the context of a plug-in, but you might have problems with the LGPL license of FFTW in that case, depending on your use case. There are different issues with it on macOS, but it sounds like you are on windows, so here are some windows tips:
If you want to use FFTW as a DLL
You can either
- put the DLL in C:\Windows\System32 . This is a horrible solution, since it requires elevated permissions and other software might put their DLL there with the same name
- load the DLL at runtime from a specified location with LoadLibrary(). You could use this library to handle that in a cross platform way, helping you get function pointers for all the FFTW functions you need
- Investigate adding a path using the win32 APIs, telling the parent process where to find DLLs. I expect you can find more information about that here
God that is a pain haha. I tried compiling FFTW myself but I couldn’t get it to work. When I saw the precompiled version on the website, I thought that would be enough, but apparently there’s a lot more I need to do in order for it to work properly. FFTW doesn’t make this easy, if I still can’t figure it out I’ll try using a different library.