I am a beginner of the great FFT library "FFTW", and nowdays I've met a strange problem which confused me:
I've downloaded the pre-compiled binary packet for Windows, and I've written some test codes which include the function like 'fftwf_malloc' etc, but when I tried to compile the codes, I just got 'undefined reference' problems :(
I've searched the header codes and I've found that the header file 开发者_Go百科'fftw3.h' seems doesn't define the 'fftwf_malloc' at all ... Then how can use it ? I am just confused ...
Dose anyone knows something about this ? Thanks :)
I think you need to tell your compiler/linker where to find the appropriate library. On Unix system, link with -lfftw3 -lm
. On Windows, the way to do this is probably going to depend on what compiler you're using.
Note: FFTW comes built in various precisions, so you may need to do -lfftw3 -lfftw3f
. If you skip one of those the undefined-symbol errors don't change much so it's easy to overlook.
精彩评论