WG: AW: Re: AW: [Insight-users] accessing and building Itk applications

Luis Ibanez luis.ibanez@kitware.com
Thu, 06 Mar 2003 15:39:06 -0500


Hi Zein,

These errors seem to be produced by:

1) You are linking the Debug library of FLTK
    against a non debug build of the application
    (those are the messages 'already defined')

2) You are not adding ITKCommon, ITKIO to the
    list of libraries to link with in the
    CMakeLists.txt file of your applications.
   (those are the messages 'unresolved external
    itk::Process... etc)

3) You are not linking with the fltk_gl library
    (those are the messages 'unresolved external
     Fl_Gl_Window...)


Please let us know if you have further problems,


Thanks


Luis


-------------------------------------------

salah wrote:
> 
> ------------------------------------------------------------------------
> 
> --------------------Configuration: MetaImageColorViewer - Win32 Debug--------------------
> Linking...
> fltkd.lib(Fl_Group.obj) : error LNK2005: "public: void __thiscall Fl_Group::end(void)" (?end@Fl_Group@@QAEXXZ) already defined in ColorViewerGUI.obj
> fltkd.lib(Fl_Group.obj) : error LNK2005: "public: static class Fl_Group * __cdecl Fl_Group::current(void)" (?current@Fl_Group@@SAPAV1@XZ) already defined in ColorViewerGUI.obj
> ColorViewer.obj : error LNK2001: unresolved external symbol "char * __cdecl fl_file_chooser(char const *,char const *,char const *)" (?fl_file_chooser@@YAPADPBD00@Z)
> main.obj : error LNK2001: unresolved external symbol "char * __cdecl fl_file_chooser(char const *,char const *,char const *)" (?fl_file_chooser@@YAPADPBD00@Z)
> ColorViewer.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall itk::ProcessObject::GenerateOutputRequestedRegion(class itk::DataObject *)" (?GenerateOutputRequestedRegion@ProcessObject@itk@@UAEXPAVDataObject@2@@Z)
> main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall itk::ProcessObject::GenerateOutputRequestedRegion(class itk::DataObject *)" (?GenerateOutputRequestedRegion@ProcessObject@itk@@UAEXPAVDataObject@2@@Z)
> ColorViewer.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall itk::ProcessObject::GenerateOutputInformation(void)" (?GenerateOutputInformation@ProcessObject@itk@@UAEXXZ)
> main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall itk::ProcessObject::GenerateOutputInformation(void)" (?GenerateOutputInformation@ProcessObject@itk@@UAEXXZ)
> ColorViewer.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall itk::ProcessObject::GenerateInputRequestedRegion(void)" (?GenerateInputRequestedRegion@ProcessObject@itk@@UAEXXZ)
> main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall itk::ProcessObject::GenerateInputRequestedRegion(void)" (?GenerateInputRequestedRegion@ProcessObject@itk@@UAEXXZ)
> ColorViewer.obj : error LNK2001: unresolved external symbol "public: static class itk::SmartPointer<class itk::ImageIOBase>  __cdecl itk::ImageIOFactory::CreateImageIO(char const *)" (?CreateImageIO@ImageIOFactory@itk@@SA?AV?$SmartPointer@VImageIOBa
> se@itk@@@2@PBD@Z)
> main.obj : error LNK2001: unresolved external symbol "public: static class itk::SmartPointer<class itk::ImageIOBase>  __cdecl itk::ImageIOFactory::CreateImageIO(char const *)" (?CreateImageIO@ImageIOFactory@itk@@SA?AV?$SmartPointer@VImageIOBase@itk@
> @@2@PBD@Z)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall Fl_Output::handle(int)" (?handle@Fl_Output@@UAEHH@Z)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Fl_Output::draw(void)" (?draw@Fl_Output@@MAEXXZ)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall Fl_Gl_Window::draw_overlay(void)" (?draw_overlay@Fl_Gl_Window@@EAEXXZ)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Fl_Gl_Window::hide(void)" (?hide@Fl_Gl_Window@@UAEXXZ)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Fl_Gl_Window::show(void)" (?show@Fl_Gl_Window@@UAEXXZ)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Fl_Gl_Window::flush(void)" (?flush@Fl_Gl_Window@@UAEXXZ)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Fl_Gl_Window::resize(int,int,int,int)" (?resize@Fl_Gl_Window@@UAEXHHHH@Z)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "void __cdecl gl_draw(char const *,int,int)" (?gl_draw@@YAXPBDHH@Z)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "void __cdecl gl_draw(char const *,float,float)" (?gl_draw@@YAXPBDMM@Z)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "double __cdecl gl_width(char const *)" (?gl_width@@YANPBD@Z)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "int __cdecl gl_height(void)" (?gl_height@@YAHXZ)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "void __cdecl gl_font(int,int)" (?gl_font@@YAXHH@Z)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "public: void __thiscall Fl_Gl_Window::ortho(void)" (?ortho@Fl_Gl_Window@@QAEXXZ)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "public: void __thiscall Fl_Gl_Window::make_current(void)" (?make_current@Fl_Gl_Window@@QAEXXZ)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Fl_Gl_Window::~Fl_Gl_Window(void)" (??1Fl_Gl_Window@@UAE@XZ)
> ColorViewerGUI.obj : error LNK2001: unresolved external symbol "private: void __thiscall Fl_Gl_Window::init(void)" (?init@Fl_Gl_Window@@AAEXXZ)
> fltkd.lib(Fl_x.obj) : error LNK2001: unresolved external symbol __imp___TrackMouseEvent@4
> D:\ITK-bin\bin\Debug/ColorViewer.exe : fatal error LNK1120: 22 unresolved externals
> Error executing link.exe.
> 
> ColorViewer.exe - 30 error(s), 0 warning(s)