[Insight-users] Missing Classes on Python

Luis Ibanez luis.ibanez at kitware.com
Sat, 21 Feb 2004 02:05:08 -0500


Hi Elisa,

You cannot mix MFC and FLTK.

Both of them are GUI libraries.
You will have to make a choice.

If you take FLTK, the problem you
have at link time caused by the
absence of

        ${FLTK_LIBRARIES}

In your command

         LINK_LIBRRARIES

Look at the tutorial session "V" for
an explanation on how to use FLTK
as a GUI and configure it in  the
CMakeLists.txt file.


Regards,


    Luis



------------------
Elisa Royuela wrote:

> Hello,
>  
> I have some problems with FLTK:
>  
> (A)  In fact, I have a program that works on another computer with VTK 
> 3.2, FLTK 1.0.11, but it doesn't on my computer with ITK 1.0, VTK 4.0, 
> FLTK 1.1.4.
>  
> The program uses flvtk for the GUI and is built with visual c++ 6.0 (all 
> the header files and libraries are supposed to have beeb included 
> because it works in the first computer).
>  
> Here are the errors:
>  
> -----------------------------------------------------------
> Linking...
> vtkFlRenderWindowInteractor.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 
> <mailto:?draw_overlay at Fl_Gl_Window at  at EAEXXZ>)
> vtkFlRenderWindowInteractor.obj : error LNK2001: unresolved external 
> symbol "public: virtual void __thiscall Fl_Gl_Window::hide(void)" 
> (?hide at Fl_Gl_Window at  at UAEXXZ <mailto:?hide at Fl_Gl_Window at  at UAEXXZ>)
> vtkFlRenderWindowInteractor.obj : error LNK2001: unresolved external 
> symbol "public: virtual void __thiscall Fl_Gl_Window::show(void)" 
> (?show at Fl_Gl_Window at  at UAEXXZ <mailto:?show at Fl_Gl_Window at  at UAEXXZ>)
> vtkFlRenderWindowInteractor.obj : error LNK2001: unresolved external 
> symbol "public: virtual __thiscall Fl_Gl_Window::~Fl_Gl_Window(void)" 
> (??1Fl_Gl_Window at  at UAE at XZ <mailto:??1Fl_Gl_Window at  at UAE at XZ>)
> vtkFlRenderWindowInteract or.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 
> <mailto:?resize at Fl_Gl_Window at  at UAEXHHHH at Z>)
> vtkFlRenderWindowInteractor.obj : error LNK2001: unresolved external 
> symbol "public: virtual void __thiscall Fl_Gl_Window::flush(void)" 
> (?flush at Fl_Gl_Window at  at UAEXXZ <mailto:?flush at Fl_Gl_Window at  at UAEXXZ>)
> vtkFlRenderWindowInteractor.obj : error LNK2001: unresolved external 
> symbol "private: void __thiscall Fl_Gl_Window::init(void)" 
> (?init at Fl_Gl_Window at  at AAEXXZ <mailto:?init at Fl_Gl_Window at  at AAEXXZ>)
> fltkd.lib(Fl_x.obj) : error LNK2001: unresolved external symbol 
> __imp___TrackMouseEvent at 4 <mailto:__imp___TrackMouseEvent at 4>
> Debug/SliceReconstructor.exe : fatal error LNK1120: 8 unresolved externals
> Error executing link.exe.
> SliceReconstructor.exe - 9 error(s), 0 warning(s)
> -----------------------------------------------------------
>  
> I know the problem comes from FLTK but I don't know what is wrong.
>  
> (B) On the other hand, I tried to do a small example that only opens and 
> shows a png image using FLTK and ITK. It works with CMakes,  but if I 
> try to include this code in an existing VC++ application (defining a new 
> class), I have also errors:
>  
> -----------------------------------------------------------
> Linking...
>    Creating library Debug/preocr.lib and object Debug/preocr.exp
> fltkgld.lib(Fl_Gl_Window.obj) : error LNK2001: unresolved external 
> symbol __imp__wglSwapLayerBuffers at 8 <mailto:__imp__wglSwapLayerBuffers at 8>
> fltkgld.lib(Fl_Gl_Window.obj) : error LNK2001: unresolved external 
> symbol __imp__wglRealizeLayerPalette at 12 
> <mailto:__imp__wglRealizeLayerPalette at 12>
> fltkgld.lib(Fl_Gl_Choice.obj) : error LNK2001: unresolved external 
> symbol __imp__wglShareLists at 8 <mailto:__imp__wglShareLists at 8>
> fltkgld.lib(Fl_Gl_Choice.obj) : error LNK2001: unresolved external 
> symbol __imp__wglCreateLayerContext at 8 
> <mailto:__imp__wglCreateLayerContext at 8>
> fltkd.lib(fl_call_main.obj) : error LNK2001: unresolved external symbol 
> _main
> Debug/preocr.exe : fatal error LNK1120: 5 unresolved externals
> Error executing link.exe.
> preocr.exe - 6 error(s), 0 warning(s)
>  
> ----------------------------------------------------------
>  
> and I have include all the libraries I found. I have read that it is not 
> a good idea to mix MFC and FLTK, so perhaps in this second program this 
> is the problem. But in the first case (A) I don't use MFC, so how can I 
> solve the problem?
>  
> Thank you very much,
>  
>    regards, Elisa.
>  
>