I'm unable to get FFTW to link to my code in order to use its functions in my code. I have spent enough time on this that I am considering giving up on it.
I am very familiar with GSL, and have used the linear algebra libraries extensively with good results. GSL also has a set of FFT functions that seem to do the same things as FFTW. Are they just as good? Or is FFTW significantly better, and worth spending more time to try to get it to work?
(By the way, my error is that using g++ on a remote system on which I am not the admin, I am unable to compile my code to recognize references to FFTW calls. My makefile includes -L/libdirectory -lfftw3 but I still get undefined references for some (not all) fftw functions).
Here is the source:
#include "fftw3.h"
in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * length);
Here is the relevant compile command:
g++ -std=c++0x -fPIC ... -lm ... -L/libdirectory -lfftw3
Here is the error:
/source.cc: undefined reference to 'fftw_malloc'
Note that the compiler is able to find fftw3.h. I also can declare objects such as fftw_complex
and fftw_plan
.
EDIT: I still can't get my Makefile to link the static library. However, I was able to recompile with shared libraries and those seem to have worked so far. I still would like to see some benchmarks newer than 11 years old, though!