[Insight-users] FFTW library

Jeremy Lecoeur jeremy.j.lecoeur at vanderbilt.edu
Tue May 4 17:28:01 EDT 2010


Hello,

I'm trying to use a filter named FFTWComplexToComplexImageFilter. This 
filter uses the FFTW library and I have problems with this library. I'm 
under Windows 7 and using MS Visual Studio 2008 Pro.

Here is what i have done so far :
- I have downloaded the precompiled FFTW 3.2.2 Windows DLLs and used 
lib.exe to create .lib "import libraries"
- I have rebuilt ITK by checking the USE_FFTWF checkbox in cmake and 
filling the FFTWF_LIB and FFTWF_THREADS_LIB with the path to 
libfftw3-3.lib and FFTW_INCLUDE_PATH with the path to the directory 
containing fftw3.h
- I then modified the Cmakelist.txt file of my project by adding those 
lines :

SET(CMAKE_MODULE_PATH ${ITK_SOURCE_DIR}/CMake)
OPTION(USE_FFTWD "Use double precision FFTW if found" ON)
OPTION(USE_FFTWF "Use single precision FFTW if found" OFF)
FIND_PACKAGE( FFTW )

IF(USE_FFTWF)
    LINK_LIBRARIES(${FFTWF_LIB})
ENDIF(USE_FFTWF)

IF(USE_FFTWD)
    LINK_LIBRARIES(${FFTWD_LIB})
ENDIF(USE_FFTWD)

- I then rebuilt my project with cmake by providing the same info than 
those I've provided to cmake while making ITK.
-  I added the fftw libs in the Additional Dependencies in Visual Studio 
(Properties -> Configuration Properties ->Linker -> Input)

When I compile after that, I have the following error messages :
error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_c2r_1d...
error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_c2r_2d...
  error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_c2r_3d...
error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_c2r...
error LNK2019: unresolved external symbol __imp_fftwf_execute...
error LNK2019: unresolved external symbol __imp_fftwf_destroy_plan...
error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_r2c_1d...
error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_r2c_2d...
error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_r2c_3d...
  error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_r2c...

First, I don't know if I have to give the path to the libs to both ITK 
and MyProject. Any clue ?
Is the Additional Dependencies step necessary ?
Endly, does anyone have any advice on what I should try to make things 
work ? I used to work with ITK on Linux but my new lab runs under 
Windows and I'm totally lost with those DLLs/lib.

If anyone has another way of computer a FFT complex to complex, that 
would be also a good thing.

Cordially,
Jeremy

-- 
Jeremy Lecoeur, Ph.D.
Research Associate
Vanderbilt University
Email: jeremy.j.lecoeur at vanderbilt.edu



More information about the Insight-users mailing list