I would like to use FFTW3 on Windows-64 bit. I follow the instructions on FFTW website: download the package, unzip, run lib.exe to create .lib “import libraries”.
After doing so, I build my application (which runs just fine using FFTW3 dlls 32-bit) and I get the following errors:
1>pyramidTransform.obj : error
LNK2019: unresolved external symbol
__imp_fftw_destroy_plan referenced in function “int __cdecl
fourier2spatialband1(int,int,float
*,float ,double ()[2],double ()[2],double ()[2])”
(?fourier2spatialband1@@YAHHHPEAM0PEAY01N11@Z)
1>pyramidTransform.obj : error
LNK2019: unresolved external symbol
__imp_fftw_execute referenced in function “int __cdecl
fourier2spatialband1(int,int,float
*,float ,double ()[2],double ()[2],double ()[2])”
(?fourier2spatialband1@@YAHHHPEAM0PEAY01N11@Z)
1>pyramidTransform.obj : error
LNK2019: unresolved external symbol
__imp_fftw_plan_dft_2d referenced in function “int __cdecl
fourier2spatialband1(int,int,float
*,float ,double ()[2],double ()[2],double ()[2])”
(?fourier2spatialband1@@YAHHHPEAM0PEAY01N11@Z)
1>pyramidTransform.obj : error
LNK2019: unresolved external symbol
__imp_fftw_free referenced in function “int __cdecl decompose(int,int,float
*,int,int,float * *,float * *,float *,float * * *,float * * *,float * *,float * *)” (?decompose@@YAHHHPEAMHHPEAPEAM10PEAPEAPEAM211@Z)
1>pyramidTransform.obj : error
LNK2019: unresolved external symbol
__imp_fftw_malloc referenced in function “int __cdecl
decompose(int,int,float
*,int,int,float * *,float * *,float *,float * * *,float * * *,float * *,float * *)” (?decompose@@YAHHHPEAMHHPEAPEAM10PEAPEAPEAM211@Z)
The property pane for Additional Dependencies clearly shows that I am linking to libfftw3-3.lib (created above).
How can I tell what Visual Studio trying to link to? Has anyone have any luck with FFTW-3 in Windows 64-bit?
I found the problem. With FFTW3, since the authors have already compiled the DLLs for Windows, you need to create import libraries (.lib) files from the supplied .def files. You do so by going to the Visual Studio 2008 command prompt:
The problem was that I must have started the wrong command prompt when I first created these .lib files.
More instructions can be found at FFTW Windows website.
It is also important to note that if you’re following the steps from the above website, you’re gonna need to run the commands from a folder that doesn’t require administrator privileges. By doing this, you’ll be able to get your .lib files. Then, you just copy them into the VS lib folder and you’re ready to go.