<HTML>
<HEAD>
<TITLE>Problem of Build the ITK application</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Hi All,<BR>
<BR>
I try to build the application of ITK , what I did : I install the ITK VTK & FLTK and did the cmake.<BR>
<BR>
My computer is MAC<BR>
<BR>
When I do the make under the binary folder of Application.<BR>
<BR>
I list the error and my cmakelist file. <BR>
<BR>
Thanks a lot <BR>
<BR>
yingli<BR>
<BR>
<BR>
<BR>
here is the error<BR>
ld: Undefined symbols:<BR>
_fl_display<BR>
make[5]: *** [/Applications/ITK_VTK/ITK/InsightApplication_binary/SegmentationEditorFltkGui/EditorFltkGui/EditorFltkGui] Error 1<BR>
make[4]: *** [default_target] Error 2<BR>
make[3]: *** [default_target_EditorFltkGui] Error 2<BR>
make[2]: *** [default_target] Error 2<BR>
make[1]: *** [default_target_SegmentationEditorFltkGui] Error 2<BR>
make: *** [default_target] Error 2<BR>
<BR>
Here is my cmakelist.txt file<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
CMAKE_MINIMUM_REQUIRED(VERSION 1.6)<BR>
PROJECT(InsightApplications)<BR>
INCLUDE_REGULAR_EXPRESSION("^.*$")<BR>
<BR>
# Tell CMake's FIND_PACKAGE command where to look for our Find<pkg><BR>
# modules.<BR>
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${InsightApplications_SOURCE_DIR})<BR>
<BR>
IF(NOT WIN32)<BR>
OPTION(BUILD_SHARED_LIBS "Build Insight-Applications with shared libraries." OFF)<BR>
ENDIF(NOT WIN32)<BR>
<BR>
# Don't build anything unless the version of CMake is high enough.<BR>
# The matching ELSE/ENDIF should be the last lines in the file.<BR>
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.5)<BR>
<BR>
FIND_PACKAGE(ITK)<BR>
IF(ITK_FOUND)<BR>
INCLUDE(${ITK_USE_FILE})<BR>
ELSE(ITK_FOUND)<BR>
MESSAGE(FATAL_ERROR<BR>
"Cannot build InsightApplications without ITK. Please set ITK_DIR.")<BR>
ENDIF(ITK_FOUND)<BR>
<BR>
#-----------------------------------------------------------------------------<BR>
# Configure Dart testing support.<BR>
INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)<BR>
MARK_AS_ADVANCED(TCL_TCLSH)<BR>
IF(BUILD_TESTING)<BR>
ENABLE_TESTING()<BR>
ENDIF(BUILD_TESTING)<BR>
<BR>
# Determine what packages are available<BR>
# Add an option to use or not use VTK<BR>
OPTION(USE_VTK "Use VTK (The Visualization Toolkit) (some applications need this)" OFF)<BR>
IF(USE_VTK)<BR>
FIND_PACKAGE(VTK)<BR>
IF (VTK_FOUND)<BR>
INCLUDE (${VTK_USE_FILE})<BR>
<BR>
<BR>
# Test for VTK using std libs<BR>
IF(NOT VTK_USE_ANSI_STDLIB)<BR>
MESSAGE("Warning. Your VTK was not built with the VTK_USE_ANSI_STDLIB "<BR>
"option ON. Link errors may occur. Consider re-building VTK "<BR>
"with this option ON. For MSVC 6, you MUST turn on the VTK "<BR>
"option. ITK will not link otherwise.")<BR>
ENDIF(NOT VTK_USE_ANSI_STDLIB)<BR>
<BR>
# Test for VTK building Hybrid<BR>
IF(NOT VTK_USE_HYBRID)<BR>
MESSAGE("Your VTK was not built with the VTK_USE_HYBRID option ON. "<BR>
"Please reconfigure and recompile VTK with this option before "<BR>
"trying to use it with ITK.")<BR>
SET(VTK_FOUND 0)<BR>
ENDIF(NOT VTK_USE_HYBRID)<BR>
ELSE(VTK_FOUND)<BR>
MESSAGE(FATAL_ERROR<BR>
"Cannot build InsightApplications without VTK. Please set VTK_DIR.")<BR>
ENDIF(VTK_FOUND)<BR>
<BR>
<BR>
ENDIF(USE_VTK)<BR>
<BR>
# Look for OpenGL.<BR>
FIND_PACKAGE(OpenGL)<BR>
<BR>
IF(OPENGL_INCLUDE_PATH)<BR>
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_PATH})<BR>
ENDIF(OPENGL_INCLUDE_PATH)<BR>
<BR>
# Add an option to use or not use FLTK (<a href="http://www.fltk.org)">http://www.fltk.org)</a><BR>
OPTION(USE_FLTK "Use FLTK (The Fast Light Toolkit) for GUI (some applications need this)" OFF)<BR>
IF(USE_FLTK)<BR>
FIND_PACKAGE(FLTK)<BR>
IF(FLTK_FOUND)<BR>
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})<BR>
ELSE(FLTK_FOUND)<BR>
MESSAGE(FATAL_ERROR<BR>
"Cannot build InsightApplications without FLTK. Please set FLTK_DIR.")<BR>
<BR>
ENDIF(FLTK_FOUND)<BR>
ENDIF(USE_FLTK)<BR>
<BR>
# The fluid-generated fltk sources have many warnings. This macro<BR>
# will disable warnings for the generated files on some compilers.<BR>
MACRO(ITK_DISABLE_FLTK_GENERATED_WARNINGS files)<BR>
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.6)<BR>
IF(CMAKE_COMPILER_IS_GNUCXX)<BR>
FOREACH(f ${files})<BR>
STRING(REGEX REPLACE "\\.fl$" ".cxx" SRC "${f}")<BR>
STRING(REGEX REPLACE ".*/([^/]*)$" "\\1" SRC "${SRC}")<BR>
SET_SOURCE_FILES_PROPERTIES(${SRC} PROPERTIES COMPILE_FLAGS -w)<BR>
ENDFOREACH(f)<BR>
ENDIF(CMAKE_COMPILER_IS_GNUCXX)<BR>
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.6)<BR>
ENDMACRO(ITK_DISABLE_FLTK_GENERATED_WARNINGS)<BR>
<BR>
# Macro for adding resources to GUI application on the Mac<BR>
#<BR>
IF(APPLE)<BR>
FIND_PROGRAM(ITK_APPLE_RESOURCE Rez /Developer/Tools)<BR>
FIND_FILE(ITK_FLTK_RESOURCE mac.r /usr/local/include/FL)<BR>
IF(NOT ITK_FLTK_RESOURCE)<BR>
MESSAGE("Fltk resources not found, GUI application will not respond to mouse events")<BR>
ENDIF(NOT ITK_FLTK_RESOURCE)<BR>
<BR>
MACRO(ADD_GUI_EXECUTABLE name sources)<BR>
ADD_EXECUTABLE(${name} ${sources})<BR>
SET(EXEC_PATH ${EXECUTABLE_OUTPUT_PATH}) <BR>
IF(NOT EXEC_PATH)<BR>
SET(EXEC_PATH ${CMAKE_CURRENT_BINARY_DIR})<BR>
ENDIF(NOT EXEC_PATH)<BR>
IF(ITK_APPLE_RESOURCE)<BR>
ADD_CUSTOM_COMMAND(SOURCE ${name}<BR>
COMMAND ${ITK_APPLE_RESOURCE}<BR>
ARGS -t APPL ${ITK_FLTK_RESOURCE} -o <BR>
${EXEC_PATH}/${name}<BR>
TARGET ${name})<BR>
ENDIF(ITK_APPLE_RESOURCE)<BR>
ENDMACRO(ADD_GUI_EXECUTABLE)<BR>
ELSE(APPLE)<BR>
MACRO(ADD_GUI_EXECUTABLE name sources)<BR>
ADD_EXECUTABLE(${name} ${sources})<BR>
ENDMACRO(ADD_GUI_EXECUTABLE)<BR>
ENDIF(APPLE)<BR>
<BR>
#<BR>
<BR>
#Build the Auxiliary directory on which many applications depend<BR>
SUBDIRS(Auxiliary)<BR>
<BR>
#Build the example of how to do simple scalar anisotropic diffusion<BR>
#on a PNG image<BR>
SUBDIRS (AnisotropicDiffusionImageFilter)<BR>
<BR>
#Build the example of various methods of segmentation using level sets.<BR>
SUBDIRS (LevelSetSegmentation)<BR>
<BR>
#Build the example of how to create a static library for <BR>
# select filters in itk.<BR>
SUBDIRS (ITKFilterLib)<BR>
<BR>
#Build the example of how to create a static library for <BR>
# the multi-resolution mutual information registration framework in itk.<BR>
SUBDIRS (ITKRegistrationLib)<BR>
<BR>
#Build the parameter file parser necessary for several applications that follow<BR>
SUBDIRS(StreamedWatershedSegmentation/ParameterFileParser)<BR>
<BR>
# Build the StreamedWatershedSegmentation example<BR>
#SUBDIRS(StreamedWatershedSegmentation)<BR>
<BR>
# Build the AntiAliasBinaryImageFilter example<BR>
SUBDIRS(AntiAliasBinaryImageFilter)<BR>
<BR>
# Build the SimpleLevelSetsExample<BR>
SUBDIRS(SimpleLevelSetsExample)<BR>
<BR>
# Build the FloodFilledSpatialFunctionExample<BR>
SUBDIRS(FloodFilledSpatialFunction)<BR>
<BR>
# Build the Multiresolution Registration example<BR>
SUBDIRS(MultiResMIRegistration)<BR>
<BR>
# Build the MI Validation application<BR>
SUBDIRS(MIValidation)<BR>
<BR>
# Build the IBSR Validation applications<BR>
SUBDIRS(IBSRValidation)<BR>
<BR>
# Build the multichannel tissue classification validation<BR>
SUBDIRS(MultichannelTissueClassificationValidation)<BR>
<BR>
# Build the DICOMApp example to output raw and png versions of DICOM file<BR>
SUBDIRS(DICOMApp)<BR>
<BR>
#Build the examples of various fourth-order level set PDEs <BR>
SUBDIRS (LevelSetSurfaceProcessing)<BR>
<BR>
# Applications requiring MetaImages and Fltk GUI <BR>
IF(FLTK_FOUND)<BR>
IF(WIN32)<BR>
ADD_DEFINITIONS(-DWIN32)<BR>
ENDIF(WIN32)<BR>
SUBDIRS(DistanceMapFilter)<BR>
SUBDIRS(DicomImageViewer)<BR>
SUBDIRS(GaussianFilter)<BR>
SUBDIRS(Curves2DExtractor)<BR>
SUBDIRS(Morphogenesis)<BR>
SUBDIRS(MutualInformationEuler2DRegistration)<BR>
SUBDIRS(ImageRegistration)<BR>
SUBDIRS(ImageRegistration2D)<BR>
SUBDIRS(LandmarkInitializedMutualInformationRegistration)<BR>
SUBDIRS(RawImageReaderViewer)<BR>
SUBDIRS(VoronoiSegmentation)<BR>
SUBDIRS(SimpleFuzzyConnectedness)<BR>
SUBDIRS(ThresholdSegmentationLevelSetFltkGui)<BR>
IF(VTK_FOUND)<BR>
SUBDIRS(RegionGrowingSegmentation)<BR>
SUBDIRS(ThresholdSegmentationLevelSet)<BR>
SUBDIRS(FastMarchingLevelSet)<BR>
SUBDIRS(ShapeDetectionLevelSet)<BR>
SUBDIRS(GeodesicActiveContour)<BR>
SUBDIRS(SegmentationEditorFltkGui)<BR>
SUBDIRS(SNAP)<BR>
ENDIF(VTK_FOUND)<BR>
SUBDIRS(ImageViewer)<BR>
SUBDIRS(ImageColorViewer)<BR>
ENDIF(FLTK_FOUND)<BR>
<BR>
# MetaImage Utilities<BR>
SUBDIRS(MetaImageImporter)<BR>
SUBDIRS(MetaImageReadWrite)<BR>
<BR>
# Test the conditions for building the MRIBiasCorrection example<BR>
SUBDIRS(MRIBiasCorrection)<BR>
<BR>
# Add an option to build FEM applications<BR>
SUBDIRS(FEM)<BR>
<BR>
# Add an option to build or not build the FuzzyConnectedness example<BR>
SUBDIRS(FuzzyConnectedness)<BR>
<BR>
# Add an option to build or not build the<BR>
# GaussianMinimumErrorClassifier example<BR>
SUBDIRS(GaussianMinimumErrorClassifier)<BR>
<BR>
# Add an option to build or not build the EllipsoidInteriorExteriorSpatialFunction example<BR>
SUBDIRS(EllipsoidInteriorExteriorSpatialFunction)<BR>
<BR>
# Add an option to build or not build the SymmetricEllipsoidInteriorExteriorSpatialFunction example<BR>
SUBDIRS(SymmetricEllipsoidInteriorExteriorSpatialFunction)<BR>
<BR>
# Test the conditions for building the ThinPlateSplines example<BR>
IF(VTK_FOUND)<BR>
IF(FLTK_FOUND)<BR>
SUBDIRS(ThinPlateSplines)<BR>
ENDIF(FLTK_FOUND)<BR>
<BR>
IF(VTK_WRAP_TCL)<BR>
SUBDIRS(MRIRegistration vtkITK SegmentationEditor)<BR>
ENDIF(VTK_WRAP_TCL)<BR>
<BR>
SET (VTK_AND_ITK_WRAPPED 0)<BR>
IF(VTK_WRAP_PYTHON AND ITK_CSWIG_PYTHON)<BR>
SET(VTK_AND_ITK_WRAPPED 1)<BR>
ENDIF(VTK_WRAP_PYTHON AND ITK_CSWIG_PYTHON)<BR>
IF(VTK_WRAP_TCL AND ITK_CSWIG_TCL)<BR>
SET(VTK_AND_ITK_WRAPPED 1)<BR>
ENDIF(VTK_WRAP_TCL AND ITK_CSWIG_TCL)<BR>
<BR>
IF(VTK_AND_ITK_WRAPPED)<BR>
SUBDIRS(ConnectVTKITK)<BR>
ENDIF(VTK_AND_ITK_WRAPPED)<BR>
<BR>
ENDIF(VTK_FOUND)<BR>
<BR>
LINK_LIBRARIES (<BR>
ITKAlgorithms<BR>
ITKCommon<BR>
ITKBasicFilters <BR>
)<BR>
<BR>
# If the version of CMake was too old, complain and build nothing.<BR>
# These should be the last lines in this file.<BR>
ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.5)<BR>
MESSAGE(SEND_ERROR<BR>
"This version of CMake is too old to build InsightApplications. "<BR>
"Please upgrade to CMake 1.6.")<BR>
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.5)<BR>
<BR>
<FONT COLOR="#0000FF">*******************************************************<BR>
Yingli Fan<BR>
</FONT></SPAN></FONT><SPAN STYLE='font-size:12.0px'><FONT COLOR="#0000FF"><FONT FACE="Monaco, Courier New">Laboratory for Bioimaging and Anatomical Informatics<BR>
</FONT><FONT FACE="Verdana, Helvetica, Arial">Department of Neurobiology & Anatomy<BR>
Drexel University, College of Medicine<BR>
2900 Queen Lane PA 19129<BR>
Tel: 215-9918455 Fax: 215-843-9367<BR>
Email: Yingli.Fan@drexel.edu <BR>
*******************************************************<BR>
</FONT></FONT><FONT FACE="Verdana, Helvetica, Arial"><BR>
</FONT></SPAN>
</BODY>
</HTML>