Hello, One guess I have is that the Visual Studio version used to compile FFTW is different than the one you are using. This could cause linking problems due to the different versions. Just a guess though.
Brad On Dec 9, 2014, at 2:01 PM, Tim Jackson <tj.jackson1...@gmail.com> wrote: > Hello, > > I am currently writing a C++ program that I've called FTTC using VS2012 to > compile. I'm having problems including the FFTW libraries, which I > downloaded v3.3.4 of the precompiled libraries for Windows, into ITK. I > reconfigured and rebuilt ITK v4.6.1, changing the variables in CMake to turn > on ITK_USE_FFTWF and set the path for both FFTWF_LIB and FFTWF_THREADS_LIB to > the downloaded version of libfftw3-3.lib. I also set FFTW_INCLUDE_PATH to > where all of the downloaded files for the FFTW are located. > > ITK built without a problem, but when I now compile my program that uses the > FFTWForwardFFTImageFilter and FFTWInverseFFTImageFilter, I get a whole host > of linker error messages: > > fttc.obj : error LNK2019: unresolved external symbol __imp__fftwf_execute > referenced in function "protected: virtual void __thiscall > itk::FFTWInverseFFTImageFilter<class itk::Image<float,2>,class > itk::Image<float,2> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@?$FFTWInverseFFTImageFilter@V?$Image@M$01@itk@@V12@@itk@@MAEXXZ) > > fttc.obj : error LNK2019: unresolved external symbol > __imp__fftwf_plan_dft_r2c referenced in function "public: static struct > fftwf_plan_s * __cdecl itk::fftw::Proxy<float>::Plan_dft_r2c(int,int const > *,float *,float (*)[2],unsigned int,int,bool)" > (?Plan_dft_r2c@?$Proxy@M@fftw@itk@@SAPAUfftwf_plan_s@@HPBHPAMPAY01MIH_N@Z) > > fttc.obj : error LNK2019: unresolved external symbol > __imp__fftwf_plan_dft_c2r referenced in function "public: static struct > fftwf_plan_s * __cdecl itk::fftw::Proxy<float>::Plan_dft_c2r(int,int const > *,float (*)[2],float *,unsigned int,int,bool)" > (?Plan_dft_c2r@?$Proxy@M@fftw@itk@@SAPAUfftwf_plan_s@@HPBHPAY01MPAMIH_N@Z) > > fttc.obj : error LNK2019: unresolved external symbol > __imp__fftwf_destroy_plan referenced in function "protected: virtual void > __thiscall itk::FFTWInverseFFTImageFilter<class itk::Image<float,2>,class > itk::Image<float,2> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@?$FFTWInverseFFTImageFilter@V?$Image@M$01@itk@@V12@@itk@@MAEXXZ) > > fttc.obj : error LNK2019: unresolved external symbol > __imp__fftwf_plan_with_nthreads referenced in function "public: static struct > fftwf_plan_s * __cdecl itk::fftw::Proxy<float>::Plan_dft_c2r(int,int const > *,float (*)[2],float *,unsigned int,int,bool)" > (?Plan_dft_c2r@?$Proxy@M@fftw@itk@@SAPAUfftwf_plan_s@@HPBHPAY01MPAMIH_N@Z) > > ITKFFT-4.6.lib(itkFFTWGlobalConfiguration.obj) : error LNK2019: unresolved > external symbol __imp__fftwf_cleanup referenced in function "private: virtual > __thiscall itk::FFTWGlobalConfiguration::~FFTWGlobalConfiguration(void)" > (??1FFTWGlobalConfiguration@itk@@EAE@XZ) > > ITKFFT-4.6.lib(itkFFTWGlobalConfiguration.obj) : error LNK2019: unresolved > external symbol __imp__fftwf_init_threads referenced in function > __catch$??0FFTWGlobalConfiguration@itk@@AAE@XZ$0 > > ITKFFT-4.6.lib(itkFFTWGlobalConfiguration.obj) : error LNK2019: unresolved > external symbol __imp__fftwf_cleanup_threads referenced in function "private: > virtual __thiscall > itk::FFTWGlobalConfiguration::~FFTWGlobalConfiguration(void)" > (??1FFTWGlobalConfiguration@itk@@EAE@XZ) > > ITKFFT-4.6.lib(itkFFTWGlobalConfiguration.obj) : error LNK2019: unresolved > external symbol __imp__fftwf_import_system_wisdom referenced in function > __catch$??0FFTWGlobalConfiguration@itk@@AAE@XZ$0 > > ITKFFT-4.6.lib(itkFFTWGlobalConfiguration.obj) : error LNK2019: unresolved > external symbol __imp__fftwf_import_wisdom_from_file referenced in function > "public: static bool __cdecl > itk::FFTWGlobalConfiguration::ExportWisdomFileFloat(class > std::basic_string<char,struct std::char_traits<char>,class > std::allocator<char> > const &)" > (?ExportWisdomFileFloat@FFTWGlobalConfiguration@itk@@SA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) > > C:\MIIA\FTTCBin\Release\FTTC.exe : fatal error LNK1120: 10 unresolved > externals > > > I've spent a long time searching the help forums and looked for ways to > resolve this, but to no avail. Does anyone know what I may be doing wrong? > I'm guessing I did something wrong when setting variables in CMake, but > haven't been able to find any information on how to set them correctly. > > Thanks for your time and assistance! > > Best, > Tim > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > _______________________________________________ > Community mailing list > commun...@itk.org > http://public.kitware.com/mailman/listinfo/community _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/insight-developers