[Insight-users] problem with FLTK and ITK link
Luis Ibanez
luis.ibanez at kitware.com
Sat Oct 28 12:23:09 EDT 2006
Hi Richard,
Welcome to ITK !
This example depends on a library created in
InsightApplications/Auxiliary/FltkImageViewer
You *MUST* take that directory too when you extract the
RegionGrowingSegmentation application.
Most of the symbols that the linker is not finding are
defined in that Library.
Regards,
Luis
-------------------
Richard Ye wrote:
> Dear ITK-users,
>
> I am a new person to ITK. I am trying to rebuild
> regionGrowingsegmentation application outside of the ITK application
> Tree. But I got the following link errors. the CMakeLists.txt that I
> used is: (fltk1.1.7, itk2.8.1, vtk5), Could you please give me some
> hints on this issue. Thank you very much. Richard.
>
> PROJECT( RegionGrowingSegmentation )
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
> INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
> MESSAGE(FATAL_ERROR
> "Cannot build InsightApplications without ITK. Please set
> ITK_DIR.")
> ENDIF(ITK_FOUND)
> FIND_PACKAGE(FLTK)
> IF(FLTK_FOUND)
> INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
> ENDIF(FLTK_FOUND)
> FIND_PACKAGE(VTK)
> IF (VTK_FOUND)
> INCLUDE (${VTK_USE_FILE})
> ENDIF (VTK_FOUND)
> FIND_PATH(InsightApplications_SOURCE_DIR CMakeList.txt)
> FIND_PATH(InsightApplications_BINARY_DIR CMakeCache.txt)
> FIND_LIBRARY(FltkImageViewer_LIB NAMES FltkImageViewer)
> FIND_LIBRARY(VtkFltk_LIB NAMES VtkFltk)
> INCLUDE_DIRECTORIES(
> ${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer
> ${InsightApplications_SOURCE_DIR}/Auxiliary/VtkFltk
> ${InsightApplications_SOURCE_DIR}/Auxiliary/vtk
> ${InsightApplications_BINARY_DIR}/Auxiliary/FltkImageViewer
> ${InsightApplications_BINARY_DIR}/Auxiliary/VtkFltk
> ${RegionGrowingSegmentation_SOURCE_DIR}
> ${RegionGrowingSegmentation_BINARY_DIR}
> )
> IF(FLTK_FOUND)
> FLTK_WRAP_UI( RegionGrowingSegmentation RegionGrowingSegmentationGUI.fl)
> ENDIF(FLTK_FOUND)
>
> SET(RegionGrowingSegmentation_SRCS
> RegionGrowingSegmentationBase.cxx
> RegionGrowingSegmentation.cxx
> ${RegionGrowingSegmentation_FLTK_UI_SRCS}
> )
>
> ADD_EXECUTABLE(RegionGrowingSegmentation
> ${RegionGrowingSegmentation_SRCS}
> )
>
> TARGET_LINK_LIBRARIES(RegionGrowingSegmentation
> ${FLTK_LIBRARIES}
> ${OPENGL_LIBRARY}
> ${GLU_LIBRARY}
>
> ITKCommon
> ITKNumerics
> ITKBasicFilters
> ITKIO
> ${FltkImageViewer}
> ${VtkFltk}
> vtkRendering
> vtkGraphics
> vtkHybrid
> vtkImaging
> vtkIO
> vtkFiltering
> vtkCommon
> )
>
>
>
> Linking...
> Creating library Debug/RegionGrowingSegmentation.lib and object
> Debug/RegionGrowingSegmentation.exp
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: void __thiscall fltk::ProgressBar::Observe(class
> itk::Object *)" (?Observe at ProgressBar@fltk@@QAEXPAVObject at itk@@@Z
> <mailto:?Observe at ProgressBar@fltk@@QAEXPAVObject at itk@@@Z>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: void __thiscall fltk::LightButton::Observe(class
> itk::Object *)" (?Observe at LightButton@fltk@@QAEXPAVObject at itk@@@Z
> <mailto:?Observe at LightButton@fltk@@QAEXPAVObject at itk@@@Z>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: virtual void __thiscall
> fltkImageViewerGUI::AddFileMenuOptions(void)"
> (?AddFileMenuOptions at fltkImageViewerGUI@@UAEXXZ
> <mailto:?AddFileMenuOptions at fltkImageViewerGUI@@UAEXXZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: virtual void __thiscall
> fltkImageViewerGUI::AddFilterMenuOptions(void)"
> (?AddFilterMenuOptions at fltkImageViewerGUI@@UAEXXZ
> <mailto:?AddFilterMenuOptions at fltkImageViewerGUI@@UAEXXZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: virtual void __thiscall
> fltkImageViewerGUI::AddMenuBarOptions(void)"
> (?AddMenuBarOptions at fltkImageViewerGUI@@UAEXXZ
> <mailto:?AddMenuBarOptions at fltkImageViewerGUI@@UAEXXZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: virtual __thiscall
> fltkImageViewerGUI::~fltkImageViewerGUI(void)"
> (??1fltkImageViewerGUI@@UAE at XZ <mailto:??1fltkImageViewerGUI@@UAE at XZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: class Fl_Double_Window * __thiscall
> fltkImageViewerGUI::CreateGUI(void)"
> (?CreateGUI at fltkImageViewerGUI@@QAEPAVFl_Double_Window@@XZ
> <mailto:?CreateGUI at fltkImageViewerGUI@@QAEPAVFl_Double_Window@@XZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: __thiscall fltkImageViewerGUI::fltkImageViewerGUI(void)"
> (??0fltkImageViewerGUI@@QAE at XZ <mailto:??0fltkImageViewerGUI@@QAE at XZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: virtual __thiscall
> fltkVTKImageViewerGUI::~fltkVTKImageViewerGUI(void)"
> (??1fltkVTKImageViewerGUI@@UAE at XZ <mailto:??1fltkVTKImageViewerGUI@@UAE at XZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: static class vtkVolumeRayCastMapper * __cdecl
> vtkVolumeRayCastMapper::New(void)"
> (?New at vtkVolumeRayCastMapper@@SAPAV1 at XZ
> <mailto:?New at vtkVolumeRayCastMapper@@SAPAV1 at XZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: static class vtkVolumeRayCastCompositeFunction * __cdecl
> vtkVolumeRayCastCompositeFunction::New(void)"
> (?New at vtkVolumeRayCastCompositeFunction@@SAPAV1 at XZ
> <mailto:?New at vtkVolumeRayCastCompositeFunction@@SAPAV1 at XZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: void __thiscall
> vtkFlRenderWindowInteractor::SetRenderWindow(class vtkRenderWindow *)"
> (?SetRenderWindow at vtkFlRenderWindowInteractor@@QAEXPAVvtkRenderWindow@@@Z
> <mailto:?SetRenderWindow at vtkFlRenderWindowInteractor@@QAEXPAVvtkRenderWindow@@@Z>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: __thiscall
> fltkVTKImageViewerGUI::fltkVTKImageViewerGUI(void)"
> (??0fltkVTKImageViewerGUI@@QAE at XZ <mailto:??0fltkVTKImageViewerGUI@@QAE at XZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: virtual void __thiscall
> fltkVTKImageViewerGUI::Show(void)" (?Show at fltkVTKImageViewerGUI@@UAEXXZ
> <mailto:?Show at fltkVTKImageViewerGUI@@UAEXXZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "public: virtual void __thiscall
> fltkVTKImageViewerGUI::Hide(void)" (?Hide at fltkVTKImageViewerGUI@@UAEXXZ
> <mailto:?Hide at fltkVTKImageViewerGUI@@UAEXXZ>)
> RegionGrowingSegmentation.obj : error LNK2001: unresolved external
> symbol "int __cdecl ifuShowText(char const *)" (?ifuShowText@@YAHPBD at Z
> <mailto:?ifuShowText@@YAHPBD at Z>)
> RegionGrowingSegmentationGUI.obj : error LNK2001: unresolved external
> symbol "public: __thiscall
> fltk::ProgressBar::ProgressBar(int,int,int,int,char *)"
> (??0ProgressBar at fltk@@QAE at HHHHPAD@Z
> <mailto:??0ProgressBar at fltk@@QAE at HHHHPAD@Z>)
> RegionGrowingSegmentationGUI.obj : error LNK2001: unresolved external
> symbol "public: __thiscall
> fltk::LightButton::LightButton(int,int,int,int,char *)"
> (??0LightButton at fltk@@QAE at HHHHPAD@Z
> <mailto:??0LightButton at fltk@@QAE at HHHHPAD@Z>)
> Debug/RegionGrowingSegmentation.exe : fatal error LNK1120: 18 unresolved
> externals
> Error executing link.exe.
>
> ------------------------------------------------------------------------
> Get your own web address for just $1.99/1st yr <
> http://us.rd.yahoo.com/evt=43290/*http://smallbusiness.yahoo.com/domains>.
> We'll help. Yahoo! Small Business
> <http://us.rd.yahoo.com/evt=41244/*http://smallbusiness.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