Hi Jucers,
I’m having an issue building my plugin with the FFTW library. I’m running Xcode 11.4.1 on Catalina 10.15.4. Below is the full error message:
Error:
Undefined symbols for architecture x86_64: "_fftw_alloc_complex", referenced from: PlaygroundAudioProcessor::initFFT(int) in libPlayground.a(PluginProcessor.o) "_fftw_destroy_plan", referenced from: PlaygroundAudioProcessor::deinitFFT() in libPlayground.a(PluginProcessor.o) "_fftw_execute", referenced from: PlaygroundAudioProcessor::processBlock(juce::AudioBuffer<float>&, juce::MidiBuffer&) in libPlayground.a(PluginProcessor.o) "_fftw_free", referenced from: PlaygroundAudioProcessor::deinitFFT() in libPlayground.a(PluginProcessor.o) "_fftw_plan_dft_1d", referenced from: PlaygroundAudioProcessor::initFFT(int) in libPlayground.a(PluginProcessor.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
In ‘Header Search Paths’ in the Projucer I put the path to the fftw-3.3.8 main directory, and included the fftw3.h file in my audio processor editor header like so:
#include <api/fftw3.h>
As per advice I have found, I dropped the fftw3.h and static library libfftw3.a and libfftw3f.a files (I believe these are for the standard library and floating point precision libraries respectively) into the source folder in the Projucer. I have checked the architecture type in my build settings and the only options are the defaulted ‘Standard Architectures (64-bit Intel)’, ‘Native Architecture of Build Machine’ or ‘64-bit Intel’ - none of which build.
I feel the issue could be down to a 32/64-bit compatibility discrepancy but I’m also new to Juce and C++, so I’m not particularly confident in my library linking technique either! Any advice would be greatly appreciated!