[Insight-users] question about fltk to VTK FltkImageViewer

Luis Ibanez luis.ibanez at kitware.com
Wed Mar 2 20:00:25 EST 2005


Hi Uzay,

You just need to add to your CMakeLists.txt file
a line like:


INCLUDE_DIRECTORIES(
  ${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer
   )


The will add that directory to the path where header files
a searched for.


NOTE that you shouldn't use an explicit path as you are doing
for the link directories:

 > LINK_DIRECTORIES(
 > $C:/Program Files/itk/InsightApplications/Auxiliary/FltkImageViewer


Just take advantage of the variables

   InsightApplications_SOURCE_DIR
   InsightApplications_BINARY_DIR


If you are building your project outside of InsightApplications,
then you will have to explicitly define these two variables in
your CMakeLists.txt file.



Regards,



     Luis




------------------------
uzay emir wrote:

> I am trying to build the FLTK to ITK example in Getting Started IV. However I have some problems while I am compiling this code with Visual C++ 6.0. When I tried to build, I got such error. 
> 
>  
> 
> Configuration: myProject - Win32 Debug--------------------
> 
> Compiling...
> 
> myProjectGUI.cxx
> 
> C:/Program Files/itk/uzay/out/myProjectGUI.h(9) : fatal error C1083: Cannot open include file: 'fltkProgressBar.h': No such file or directory
> 
>  
> 
> Although This error I think is  due to header files from the FltkImageViewer library that is located in Auxiliary,In my CMAKElist file I include the FltkImageViewer directory. I don’t where I am making mistake. The CMAKE I wrote is outlined below. I will be very glad if anyone helps me.
> 
> PROJECT(myProject)
> FIND_PACKAGE
>  (ITK)
> IF( ITK_FOUND)
>  INCLUDE( ${USE_ITK_FILE} )
> ENDIF( ITK_FOUND)
> FIND_PACKAGE (FLTK)
> IF (FLTK_FOUND)
>  INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
> ENDIF( FLTK_FOUND)
> 
> LINK_DIRECTORIES(
> $C:/Program Files/itk/InsightApplications/Auxiliary/FltkImageViewer
> ${InsightApplications_SOURCE_DIR}/Auxiliary/VtkFltk
> ${InsightApplications_SOURCE_DIR}/Auxiliary/vtk
> ${InsightApplications_BINARY_DIR}/Auxiliary/FltkImageViewer
> ${InsightApplications_BINARY_DIR}/Auxiliary/VtkFltk
> ${myProject_SOURCE_DIR}
> ${myProject_BINARY_DIR}
> )
> 
> ADD_EXECUTABLE(myProject myProject.cxx)
> IF (FLTK_FOUND)
>  FLTK_WRAP_UI( myProject myProjectGUI.fl)
> ENDIF(FLTK_FOUND)
> TARGET_LINK_LIBRARIES( myProject ITKIO ITKFltkImageViewer ITKBasicFilters ITKNumerics ITKCommon ${FLTK_LIBRARIES})
> 
>  
> 
>  
> 
> Thank you 
> 
>  
> 
> Uzay Emir
> 
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Yahoo! Mail 
> <http://us.rd.yahoo.com/mail_us/taglines/security/*http://promotions.yahoo.com/new_mail/static/protection.html> 
> - You care about security. So do we.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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