I am sure this is a simple issue, but I am having a rough time getting in done. I am using this code snippet from http://www.fftw.org/fftw2_doc/fftw_2.html. I have the library installed (via homebrew). The include folder (/usr/local/include) has
fftw3.f
fftw3.f03
fftw3.h
fftw3l.f03
fftw3q.f03
Here is the code snippet from the site. I have tried it with both fttw.h and fttw3.h
#include <fftw.h>
int main (int argc, char** argv){
fftw_complex in[N], out[N];
fftw_plan p;
p = fftw_create_plan(N, FFTW_FORWARD, FFTW_ESTIMATE);
fftw_one(p, in, out);
fftw_destroy_plan(p);
return 0;
}
It keeps throwing
fftwtest.c:1:10: fatal error: 'fftw3.h' file not found
#include <fftw3.h>
^
1 error generated.
/usr/local/include
and /usr/local/lib
aren't on the default header search path anymore in Mavericks. You'll need to add them with -I
and -L
flags, respectively.
I was finally able to install pyfftw via the following, all in one terminal session:
brew install fftw
export DYLD_LIBRARY_PATH=/usr/local/lib
export LDFLAGS="-L/usr/local/include"
export CFLAGS="-I/usr/local/include"
pip install pyfftw
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With