Tatarinho Tatarinho - 11 days ago 6
C++ Question

Add FFTW library to QT project

I'm trying to add FFTW library to my QT project. I downloaded fftw-3.3.5-dll64.zip from page.

After that I unzipped it, and copy all file to "c:\fftw" directory.
In my project setting I added line like below

INCLUDEPATH += "c:\fftw"
LIBS += -L "c:\fftw" -lfftw3-3


And then, in my MainWindow.h I included it like below

#include <fftw/fftw3.h>


Unfortunately, I can't rebuild my project. I have the following error:

error: C1083: Cannot open include file: 'fftw/fftw3.h': No such file or directory


Do you have any ideas what should I do? List of files in "c:\fftw" directory.

Directory of c:\fftw

2016-11-20 14:15 <DIR> .
2016-11-20 14:15 <DIR> ..
2016-07-30 22:38 400˙306 bench.exe
2016-07-30 22:42 411˙177 benchf.exe
2016-07-30 22:44 380˙107 benchl.exe
2016-07-30 20:21 18˙342 COPYING
2016-07-30 20:21 863 COPYRIGHT
2016-07-30 22:38 184˙625 fftw-wisdom.exe
2016-07-30 22:44 2˙519 fftw3.f
2016-07-30 22:44 55˙850 fftw3.f03
2016-07-30 22:44 18˙517 fftw3.h
2016-07-30 22:44 27˙592 fftw3l.f03
2016-07-30 22:44 26˙291 fftw3q.f03
2016-07-30 22:42 184˙732 fftwf-wisdom.exe
2016-07-30 22:44 184˙732 fftwl-wisdom.exe
2016-07-30 22:44 24˙067 libfftw3-3.def
2016-07-30 22:38 2˙712˙765 libfftw3-3.dll
2016-07-30 22:44 24˙985 libfftw3f-3.def
2016-07-30 22:42 2˙772˙692 libfftw3f-3.dll
2016-07-30 22:44 14˙465 libfftw3l-3.def
2016-07-30 22:44 1˙247˙967 libfftw3l-3.dll
2016-11-20 14:15 0 lista.txt
2016-07-30 20:21 22˙670 NEWS
2016-07-30 20:21 1˙827 README
2016-07-30 22:44 2˙079 README-bench
2016-07-30 22:44 1˙293 README-WINDOWS
24 File(s) 8˙720˙463 bytes
2 Dir(s) 17˙799˙467˙008 bytes free

Answer

Ok, I did it. It seems that it was my mistake.

Problem:

I was using MSVC2013 64bit compiler. On FFTW page there is information that I need run lib.exe for VS with three def files in directory. I was trying to do that, but I wasn't able to do it. I had some lib.exe problems.

lib /def:libfftw3-3.def
lib /def:libfftw3f-3.def
lib /def:libfftw3l-3.def

Solution:

I've changed in Qt building to MinGW 32bit and I downloaded 32bit version of fftw. Now it's working perfectly

Thanks everyone for help!

Comments