[Insight-users] Please help: Cannot open include file: 'fltkLightButton.h', 'fltkImageViewer.h', …errors when building GaussianFilter outside Insightapplications

anna han wan anna.han.wan at gmail.com
Mon Jul 1 04:20:02 EDT 2013


Hi,

I want to build GaussianFilter application outside Insightapplications, so
I followed Mr Luis instructions given in: *
http://public.kitware.com/pipermail/insight-users/2003-December/005780.html*

I copied FltkImageViewer folder into the binary directory of my
GaussianFilter. I manage to build successfully FltkImageViewer , however  when
I build GaussianFilter I get the following errors:



Error      1              fatal error C1083: Cannot open include file:
'fltkLightButton.h': No such file or directory
C:\Research\GaussianFilter\bin\liFilterConsoleGUI.h      8
GaussianFilter

Error      2              fatal error C1083: Cannot open include file:
'fltkImageViewer.h': No such file or directory
C:\Research\GaussianFilter\liFilterConsole.h      20
GaussianFilter

Error      3              fatal error C1083: Cannot open include file:
'fltkLightButton.h': No such file or directory
C:\Research\GaussianFilter\bin\liFilterConsole2DGUI.h                8
GaussianFilter2D

Error      4              fatal error C1083: Cannot open include file:
'fltkImage2DViewer.h': No such file or directory
C:\Research\GaussianFilter\liFilterConsole2D.h 20           GaussianFilter2D

Warning               5              warning C4996: 'std::copy': Function
call with parameters that may be unsafe - this call relies on the caller to
check that the passed values are correct. To disable this warning, use
-D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++
'Checked Iterators'
c:\tools\itk-3.20.0\insighttoolkit-3.20.0\code\io\itkImageFileReader.txx
439
GaussianFilter

Error      6              fatal error C1083: Cannot open include file:
'fltkImageViewer.h': No such file or directory
C:\Research\GaussianFilter\liFilterConsole.h      20
GaussianFilter

Warning               7              warning C4996: 'std::copy': Function
call with parameters that may be unsafe - this call relies on the caller to
check that the passed values are correct. To disable this warning, use
-D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++
'Checked Iterators'
c:\tools\itk-3.20.0\insighttoolkit-3.20.0\code\io\itkImageFileReader.txx
439
GaussianFilter2D

Error      8              fatal error C1083: Cannot open include file:
'fltkImage2DViewer.h': No such file or directory
C:\Research\GaussianFilter\liFilterConsole2D.h 20           GaussianFilter2D





Can some one help please, I attach the CMakeLists.txt file for your
attention.

Thank you very much,



Anna.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130701/16fe3e79/attachment.htm>
-------------- next part --------------
PROJECT(GaussianFilter)

# The fluid-generated fltk sources have many warnings.  This macro
# will disable warnings for the generated files on some compilers.
MACRO(ITK_DISABLE_FLTK_GENERATED_WARNINGS files)
  IF(CMAKE_COMPILER_IS_GNUCXX)
    FOREACH(f ${files})
      STRING(REGEX REPLACE "\\.fl$" ".cxx" SRC "${f}")
      STRING(REGEX REPLACE ".*/([^/]*)$" "\\1" SRC "${SRC}")
      SET_SOURCE_FILES_PROPERTIES(${SRC} PROPERTIES COMPILE_FLAGS -w)
    ENDFOREACH(f)
  ENDIF(CMAKE_COMPILER_IS_GNUCXX)
ENDMACRO(ITK_DISABLE_FLTK_GENERATED_WARNINGS)

# Macro for adding resources to GUI application on the Mac
#
IF(APPLE AND NOT FLTK_USE_X)
    FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)
    FIND_FILE(ITK_FLTK_RESOURCE mac.r /usr/local/include/FL)
    IF(NOT ITK_FLTK_RESOURCE)
      MESSAGE("Fltk resources not found, GUI application will not respond to
mouse events")
    ENDIF(NOT ITK_FLTK_RESOURCE)

    MACRO(ADD_GUI_EXECUTABLE name sources)
      ADD_EXECUTABLE(${name} ${sources})
      INSTALL_TARGETS(/bin ${name})
      SET(EXEC_PATH ${EXECUTABLE_OUTPUT_PATH})
      IF(NOT EXEC_PATH)
        SET(EXEC_PATH ${CMAKE_CURRENT_BINARY_DIR})
      ENDIF(NOT EXEC_PATH)
        IF(ITK_APPLE_RESOURCE)
          ADD_CUSTOM_COMMAND(SOURCE ${name}
                             COMMAND ${ITK_APPLE_RESOURCE}
                             ARGS -t APPL ${ITK_FLTK_RESOURCE} -o
                             ${EXEC_PATH}/${name}
                             TARGET ${name})
        ENDIF(ITK_APPLE_RESOURCE)
    ENDMACRO(ADD_GUI_EXECUTABLE)
ELSE(APPLE AND NOT FLTK_USE_X)
  MACRO(ADD_GUI_EXECUTABLE name sources)
    ADD_EXECUTABLE(${name} ${sources})
    INSTALL_TARGETS(/bin ${name})
  ENDMACRO(ADD_GUI_EXECUTABLE)
ENDIF(APPLE AND NOT FLTK_USE_X)


INCLUDE_DIRECTORIES(
 ${FltkImageViewer_SOURCE_DIR} 
 ${FltkImageViewer_BINARY_DIR}
 ${GaussianFilter_SOURCE_DIR}
 ${GaussianFilter_BINARY_DIR}
 )




FIND_PACKAGE(ITK REQUIRED)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ENDIF(ITK_FOUND)


FIND_PACKAGE(VTK REQUIRED)
IF(VTK_FOUND)
  INCLUDE(${VTK_USE_FILE})
ENDIF(VTK_FOUND)


FIND_PACKAGE(FLTK REQUIRED)
IF(FLTK_FOUND)
  INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
ENDIF(FLTK_FOUND)

SET(GaussianFilter_SRCS
  liFilterConsole.cxx
  liFilterConsoleBase.cxx
  GaussianFilter.cxx
  )

SET(GaussianFilter2D_SRCS
  liFilterConsole2D.cxx
  liFilterConsole2DBase.cxx
  GaussianFilter2D.cxx
  )

FLTK_WRAP_UI(GaussianFilter liFilterConsoleGUI.fl)
FLTK_WRAP_UI(GaussianFilter2D liFilterConsole2DGUI.fl)

SET(GaussianFilter_SRCS
${GaussianFilter_SRCS}
${GaussianFilter_FLTK_UI_SRCS}
)

SET(GaussianFilter2D_SRCS
${GaussianFilter2D_SRCS}
${GaussianFilter2D_FLTK_UI_SRCS}
)

ADD_GUI_EXECUTABLE(GaussianFilter   "${GaussianFilter_SRCS}")
ADD_GUI_EXECUTABLE(GaussianFilter2D "${GaussianFilter2D_SRCS}")


ITK_DISABLE_FLTK_GENERATED_WARNINGS(GaussianFilter.cxx)
ITK_DISABLE_FLTK_GENERATED_WARNINGS(liFilterConsole.cxx)
ITK_DISABLE_FLTK_GENERATED_WARNINGS(liFilterConsoleGUI.cxx)
ITK_DISABLE_FLTK_GENERATED_WARNINGS(liFilterConsole2D.cxx)
ITK_DISABLE_FLTK_GENERATED_WARNINGS(liFilterConsole2DGUI.cxx)

TARGET_LINK_LIBRARIES(GaussianFilter ${FltkImageViewer} ITKIO ITKBasicFilters)
TARGET_LINK_LIBRARIES(GaussianFilter2D ${FltkImageViewer} ITKIO ITKBasicFilters)






More information about the Insight-users mailing list