[Insight-users] please help with FFTW
Karthik Krishnan
Karthik.Krishnan at kitware.com
Fri Oct 28 14:32:20 EDT 2005
Renaud Isabelle wrote:
> First of all, thank you bery much for replying.
> - my 3 files *fftw3.h, fftw3.lib and fftw3.dll* are in the same
> directory *C:\FFTW3_LIBRARIES*.
> - once I got them, I modify my *FindFFTW3.cmake* as reported. Here is
> my FindFFTW3.cmake:
>
> IF (USE_FFTW)
>
> SET(FFTW_INC_SEARCHPATH
>
> /usr/include
>
> /usr/include/fftw
>
> /usr/local/include
>
> /usr/local/include/fftw
>
> )
>
> SET(FFTW_LIB_SEARCHPATH
>
> /usr/lib
>
> /usr/lib/fftw
>
> /usr/local/lib
>
> /usr/local/lib/fftw
>
> )
>
> FIND_PATH(FFTW_INCLUDE_PATH fftw3.h ${FFTW_INC_SEARCHPATH})
>
> IF(FFTW_INCLUDE_PATH)
>
> SET(FFTW_INCLUDE ${FFTW_INCLUDE_PATH})
>
> ENDIF (FFTW_INCLUDE_PATH)
>
> FIND_LIBRARY(FFTW_LIB_PATH fftw3 ${FFTW_LIB_SEARCHPATH})
>
> IF(FFTW_LIB_PATH)
>
> SET(FFTW_LIB ${FFTW_LIB_PATH})
>
> ENDIF (FFTW_LIB_PATH)
>
> IF(FFTW_INCLUDE)
>
> IF(FFTW_LIB)
>
> SET(FFTW_FOUND 1)
>
> ENDIF (FFTW_LIB)
>
> ENDIF(FFTW_INCLUDE)
>
> IF(FFTW_FOUND)
>
> INCLUDE_DIRECTORIES( ${FFTW_INCLUDE})
>
> *LINK_LIBRARIES( ${FFTW_LIB} )*//modification
>
> ADD_DEFINITIONS(-DUSE_FFTW)
>
> SET(FFTW_DIR .)
>
> ENDIF (FFTW_FOUND)
>
> MARK_AS_ADVANCED(FFTW_INCLUDE_PATH FFTW_LIB_PATH)
>
> ENDIF (USE_FFTW)
>
> -then, I use *CMake* to *enable FFTW in ITK*: with *USE_FFTW = ON*
>
> - after that, I use *CMake to config my own project*. Here is my
> CMakeLists.txt for this project:
>
> PROJECT(Project)
>
> ADD_DEFINITIONS(-D_AFXDLL)
>
> SET(CMAKE_MFC_FLAG 6)
>
> SET(SOURCES ...)
>
> IF(WIN32)
> LINK_LIBRARIES(wsock32)
> ENDIF(WIN32)
>
> #to use ITK
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
> INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
> MESSAGE(FATAL ERROR
> "ITK not found. Please set ITK_DIR.")
> ENDIF(ITK_FOUND)
>
> #to use VTK
> FIND_PACKAGE(VTK)
> IF(VTK_FOUND)
> INCLUDE(${USE_VTK_FILE})
> ELSE(VTK_FOUND)
> MESSAGE(FATAL ERROR
> "VTK not found. Please set VTK_DIR.")
> ENDIF(VTK_FOUND)
>
> *#to use FFTW
> SET(USE_FFTW 1)
> FIND_PACKAGE( FFTW )
> *
> SET(ITK_LIBRARIES ITKBasicFilters ITKCommon ITKIO ITKAlgorithms)
> SET(VTK_LIBRARIES vtkRendering vtkGraphics vtkHybrid
> vtkImaging vtkIO vtkFiltering vtkCommon vtkWidgets)
> SET(FFTW3_LIBRARIES fftw3)
>
> ADD_EXECUTABLE(Project WIN32 ${SOURCES})
>
> TARGET_LINK_LIBRARIES(Project ${ITK_LIBRARIES} ${VTK_LIBRARIES}
> ${FFTW3_LIBRARIES})
>
> With CMake, I got the following error, *CMake Error: FFTW_DIR is set
> to C:\FFTW3 which is not a directory containing FFTWConfig.cmake. *
>
Check all your ENV{PATH} for another FindFFT.cmake . The FindFFT.cmake
that you posted above has no mention of FFTWConfig.cmake, so I can't see
why CMake should search for it.
> And now, I am still locked there. Of course, I look for this
> FFTWConfig.cmake but couldn't find it.
>
> Do you see something wrong?
>
> Isabelle
>
>
>
>
> */Hans Johnson <hans-johnson at uiowa.edu>/* a écrit :
>
> Renaud,
>
> The FFTWConfig.cmake has only been tested to work automatically on
> unix based build systems. This is not necessarily a problem, it
> just means that you will have to use cmake to explicitly define
> where you versions of the libraries and includes are.
>
> I have no experience with how fftw works under windows, so you
> will have to figure out those details on your own.
>
> The first thing you should do is to Building/Install and test the
> windows FFTW installation with respect to your environment. This
> is outside of the scope of ITK and you will need to consult the
> fftw documentation. After you can demonstrate that fftw installed
> and working correctly, you will be able to provide information to
> this list that may help in resolving the issue.
>
> At the moment, we wo! uld need to know at least the following:
> What is the complete error message given?
> What do you mean by “project failed to build because of
> FFTWConfig.cmake”? (Is there a dependancy problem, is the compiler
> trying to compile this file, is the file corrupt, does cmake fail,
> does visual studio fail)
> What have YOU done to try to resolve this problem? What
> information have YOU collected in attempting to resolve the
> problem? What is YOUR hypothesis about what is wrong?
>
> Regards,
> Hans
>
>
>
> On 10/28/05 10:23 AM, "Renaud Isabelle" <renauisa at yahoo.fr> wrote:
>
> Hi again,
>
> Now, I have fftw3.h, fftw3.lib and fftw3.dll. But, now, my own
> project failed to build because of FFTWConfig.cmake: how and
> where can I have this file. I saw nothing reporting to it.
>
> Please help me, it is quite urgent.
>
> Isabelle
>
> */Renaud Isabelle <renauisa at yahoo.fr>/* a écrit :
>
> Hi guys,
>
> *I wanna use itkFFTWRealToComplexConjugate* to compute a
> FFTW. But it doesn't compile with MSVC 6: it says that
> *FFTWRealToComplexConjugate is not a member of ITK*.!!!!!
>
> I rebuild ITK with USE_*FFTW*. But, CMake doesn't find
> FFTW_DIR. It seems that I don't have FFTW installed on my
> windows PC: is it possible?
>
> So, I went to www.fftw.org <http://www.fftw.org/> and
> downloaded binary files including *fftw3.h and
> libfftw.lib.* Is it the right way to do it?
>
> Now, I wanna rebuild my project but I got a message that
> *FFTWConfig.cmake* is missing. What do I have to do?
>
> Maybe it is simpler than that. What am I missing? Please
> really help me.
>
> Isabelle
> ------------------------------------------------------------------------
> *Appel audio GRATUIT** partout dans le monde* avec le
> nouveau Yahoo! Messenger
> Téléchargez le ici !
> <http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
> ------------------------------------------------------------------------
> *Appel audio GRATUIT** partout dans le monde* avec le nouveau
> Yahoo! Messenger
> Téléchargez le ici !
> <http://us.rd.yahoo.com/messenger/mail_taglines/yahoofr/*http://fr.messenger.yahoo.com>
>
> ------------------------------------------------------------------------
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
> ------------------------------------------------------------------------
> *Appel audio GRATUIT partout dans le monde* avec le nouveau Yahoo!
> Messenger
> Téléchargez le ici !
> <http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list