[Insight-users] ImageViewer/GLSliceView

Luis Ibanez luis.ibanez at kitware.com
Tue, 06 Apr 2004 18:06:49 -0400


Hi Kasp,


It seems that you are just missing to link with
the FLTK libraries.

Please look at the FAQ for a detailed explanation
on how to configure an use FLTK.

http://www.itk.org/cgi-bin/InsightFAQ

http://www.itk.org/cgi-bin/InsightFAQ/InsightFAQ?req=show&file=faq03.005.htp

You will also find details on this in the Tutorial
sessions,

     http://www.itk.org/HTML/Tutorials.htm

in particular in

     http://www.itk.org/CourseWare/Training/GettingStarted-IV.pdf

that describes ITK and Graphical User Interfaces
such as FLTK and QT.


   Regards,


     Luis



--------------------
ja sk wrote:

> Hi,
> 
> I am builing the ImageViewer from Insight Applications outside the
>  
> directory, but it didn't work out for me. I am doing this because 
> i'm having
>  
> trouble placing the GLSliceView on a Fltk box(i kept getting a runtime
>  
> error which the debugger points to the itkIndex.h line 188 -----  { return
>  
> m_Index[dim]; }   ), and i hope to use this
>  
> ImageViewer as an example. Can someone tell me what i'm doing
>  
> wrong, thanks alot.
>  
> Regards
> Kasp 
>  
> The CMakeList and CMakeCache files are attached.
> The errors i got for building ImageViewer are:
>  
> Linking...
>    Creating library Debug/ProjectA.lib and object Debug/ProjectA.exp
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> void __thiscall Fl_Group::end(void)" (?end at Fl_Group at  at QAEXXZ)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: void __thiscall Fl_Group::end(void)" 
> (?end at Fl_Group at  at QAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> static class Fl_Group * __cdecl Fl_Group::current(void)" 
> (?current at Fl_Group at  at SAPAV1 at XZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual void __thiscall Fl_Double_Window::hide(void)" 
> (?hide at Fl_Double_Window at  at UAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual void __thiscall Fl_Double_Window::show(void)" 
> (?show at Fl_Double_Window at  at UAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual void __thiscall Fl_Double_Window::flush(void)" 
> (?flush at Fl_Double_Window at  at UAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual void __thiscall Fl_Double_Window::resize(int,int,int,int)" 
> (?resize at Fl_Double_Window at  at UAEXHHHH at Z)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual int __thiscall Fl_Window::handle(int)" (?handle at Fl_Window at  at UAEHH at Z)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> "protected: virtual void __thiscall Fl_Window::draw(void)" 
> (?draw at Fl_Window at  at MAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual __thiscall Fl_Window::~Fl_Window(void)" (??1Fl_Window at  at UAE at XZ)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: virtual __thiscall Fl_Window::~Fl_Window(void)" 
> (??1Fl_Window at  at UAE at XZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> __thiscall Fl_Window::Fl_Window(int,int,char const *)" 
> (??0Fl_Window at  at QAE at HHPBD at Z)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: __thiscall Fl_Window::Fl_Window(int,int,char 
> const *)" (??0Fl_Window at  at QAE at HHPBD at Z)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual __thiscall Fl_Double_Window::~Fl_Double_Window(void)" 
> (??1Fl_Double_Window at  at UAE at XZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "private: 
> virtual void __thiscall Fl_Gl_Window::draw_overlay(void)" 
> (?draw_overlay at Fl_Gl_Window at  at EAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual void __thiscall Fl_Gl_Window::hide(void)" 
> (?hide at Fl_Gl_Window at  at UAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual void __thiscall Fl_Gl_Window::show(void)" 
> (?show at Fl_Gl_Window at  at UAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual void __thiscall Fl_Gl_Window::flush(void)" 
> (?flush at Fl_Gl_Window at  at UAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual __thiscall Fl_Gl_Window::~Fl_Gl_Window(void)" 
> (??1Fl_Gl_Window at  at UAE at XZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> virtual void __thiscall Fl_Gl_Window::resize(int,int,int,int)" 
> (?resize at Fl_Gl_Window at  at UAEXHHHH at Z)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "private: 
> void __thiscall Fl_Gl_Window::init(void)" (?init at Fl_Gl_Window at  at AAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> __thiscall Fl_Window::Fl_Window(int,int,int,int,char const *)" 
> (??0Fl_Window at  at QAE at HHHHPBD at Z)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> static int  Fl::e_x" (?e_x at Fl at  at 2HA)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> static int  Fl::e_y" (?e_y at Fl at  at 2HA)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> static in t  Fl::e_keysym" (?e_keysym at Fl at  at 2HA)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> static char *  Fl::e_text" (?e_text at Fl at  at 2PADA)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> void __thiscall Fl_Widget::redraw(void)" (?redraw at Fl_Widget at  at QAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glEnd at 0
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glVertex2d at 16
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glBegin at 4
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "void 
> __cdecl gl_draw(char const *,int,int)" (?gl_draw at  at YAXPBDHH at Z)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "void 
> __cdecl gl_draw(char const *,float,float)" (?gl_draw at  at YAXPBDMM at Z)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "double 
> __cdecl gl_width(char const *)" (?gl_width at  at YANPBD at Z)
> ImageViewerGUI.obj : error LNK 2001: unresolved external symbol "int 
> __cdecl gl_height(void)" (?gl_height at  at YAHXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "void 
> __cdecl gl_font(int,int)" (?gl_font at  at YAXHH at Z)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glColor4f at 16
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glDisable at 4
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glBlendFunc at 8
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glEnable at 4
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glDrawPixels at 20
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glPixelZoom at 8
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glRasterPos2i at 8
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> void __thiscall Fl_Gl_Window::ortho(void)" (?ortho at Fl_Gl_Window at  at QAEXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glLoadIdentity at 0
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glMatrixMode at 4
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glClear at 4
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glPixelStorei at 8
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glShadeModel at 4
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol 
> __imp__glClearColor at 16
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "void 
> __cdecl fl_overlay_rect(int,int,int,int)" (?fl_overlay_rect at  at YAXHHHH at Z)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "void 
> __cdecl fl_overlay_clear(void)" (?fl_overlay_clear at  at YAXXZ)
> ImageViewerGUI.obj : error LNK2001: unresolved external symbol "public: 
> void __thiscall Fl_Gl_Window::make_current(void)" 
> (?make_current at Fl_Gl_Window at  at QAEXXZ)
> ImageViewer.obj : error LNK2001: unresolved external symbol " public: 
> static int __cdecl Fl::run(void)" (?run at Fl at  at SAHXZ)
> ImageViewer.obj : error LNK2001: unresolved external symbol "public: 
> static int __cdecl Fl::check(void)" (?check at Fl at  at SAHXZ)
> ImageViewer.obj : error LNK2001: unresolved external symbol "public: 
> void __thiscall Fl_Window::label(char const *)" 
> (?label at Fl_Window at  at QAEXPBD at Z)
> ImageViewer.obj : error LNK2001: unresolved external symbol "char * 
> __cdecl fl_file_chooser(char const *,char const *,char const *,int)" 
> (?fl_file_chooser at  at YAPADPBD00H at Z)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: static class Fl_Widget * __cdecl 
> Fl::readqueue(void)" (?readqueue at Fl at  at SAPAVFl_Widget at  at XZ)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: static int __cdecl Fl::wait(void)" 
> (?wait at Fl at  at SAHXZ)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: virtual void __thiscall Fl_Window::show(void)" 
> (?show at Fl_Window at  at UAEXXZ)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: void __thiscall Fl_Window::hotspot(class 
> Fl_Widget const *,int)" (?hotspot at Fl_Window at  at QAEXPBVFl_Widget at  at H at Z)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: __thiscall 
> Fl_Button::Fl_Button(int,int,int,int,char const *)" 
> (??0Fl_Button at  at QAE at HHHHPBD at Z)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: int __thiscall Fl_Input_::value(char const *)" 
> (?value at Fl_Input_ at  at QAEHPBD at Z)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: __thiscall 
> Fl_Input::Fl_Input(int,int,int,int,char const *)" 
> (??0Fl_Input at  at QAE at HHHHPBD at Z)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: virtual void __thiscall 
> Fl_Widget::resize(int,int,int,int)" (?resize at Fl_Widget at  at UAEXHHHH at Z)
> ITKFltkImageViewer.lib(fltkUt ils.obj) : error LNK2001: unresolved 
> external symbol "public: virtual int __thiscall 
> Fl_Return_Button::handle(int)" (?handle at Fl_Return_Button at  at UAEHH at Z)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "protected: virtual void __thiscall 
> Fl_Return_Button::draw(void)" (?draw at Fl_Return_Button at  at MAEXXZ)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: virtual __thiscall Fl_Widget::~Fl_Widget(void)" 
> (??1Fl_Widget at  at UAE at XZ)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: virtual __thiscall Fl_Input_::~Fl_Input_(void)" 
> (??1Fl_Input_ at  at UAE at XZ)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: virtual void __thiscall 
> Fl_Input_::resize(int,int,int,int)" (?resize at Fl_Input_ at  at UAEXHHHH at Z)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: virtual int __thiscall Fl_Input::handle(int)" 
> (?handle at Fl_Input at  at UAEHH at Z)
> ITKFltkImageViewer.lib(fltkUtils.obj) : error LNK2001: unresolved 
> external symbol "public: virtual void __thiscall Fl_Input::draw(void)" 
> (?draw at Fl_Input at  at UAEXXZ)
> Debug/ProjectA.exe : fatal error LNK1120: 68 unresolved externals
> Error executing link.exe.
> ALL_BUILD - 72 error(s), 0 warning(s)
>  
> 
> * Yahoo! Messenger 
> <http://sg.rd.yahoo.com/mail/tagline/?http://sg.messenger.yahoo.com/>*
> - Log on <http://sg.mobile.yahoo.com/sms/msgr20.html> with your mobile 
> phone!
> 
> 
> ------------------------------------------------------------------------
> 
> PROJECT(ProjectA)
> ###############
> 
> #Find ToolKits Packages
> ########################
> 
> # Find ITK
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
>   INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
>   MESSAGE(FATAL_ERROR
>           "Cannot build without ITK.  Please set ITK_DIR.")
> ENDIF(ITK_FOUND)
> 
> # Find FLTK
> FIND_PACKAGE(FLTK)
> IF(FLTK_FOUND)
> 	INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
> ENDIF(FLTK_FOUND)
> 
> 
> #Find FltkImageViewer
> FIND_LIBRARY(FltkImageViewer_LIBRARY NAMES FltkImageViewer)
> 
> 
> SET ( ImageViewer_SRCS
>   ImageViewer.cxx
>   )
> 
> 
> ADD_EXECUTABLE(ProjectA ${ImageViewer_SRCS})
> 
> 
> 
> SET(ImageViewer_GUI_SRCS
>   ImageViewerGUI.fl
>   )
> 
> 
> # FLTK Wrapping
> ################
> IF(FLTK_FOUND)
> 	FLTK_WRAP_UI(ProjectA ${ImageViewer_GUI_SRCS} )
> 
> ENDIF(FLTK_FOUND)
> 
> 
> 
> # LIBRARIES AND EXTERNAL CODES
> ###############################
> 
> # Include directories
> INCLUDE_DIRECTORIES(
> 	C:/ITK/buildApp/Auxiliary/FltkImageViewer/Debug
> 	C:/ITK/InsightApplications-1.4.0/Auxiliary/FltkImageViewer
> )
> 
> 
> TARGET_LINK_LIBRARIES(ProjectA ITKBasicFilters
>   ITKIO
>   ${FltkImageViewer_LIBRARY}
>   
> )
>