hamed wrote:
> hi
> i try to use FLTK in DEV-C++ and when i used this source GCC compiler send an 
> error.
> 
> Source:
>  int Fl_Window::handle(int e)
>      {

        No, you don't redefine Fl_Window's handle method that way.
        You derive your own class from Fl_Window and redefine that, eg:

class YourClass : public Fl_Window
{
   ..
   int handle(int);
};

..

int YourClass::handle(int e)
{
    int ret = Fl_Window::handle(e);
    switch(e)
    {
        case FL_PUSH: ..
    }
    return(ret);
}

>      exit(1);
>      }

        Not sure what that's about; your program will exit as soon
        as the window receives an event, which is not useful.

> AND ERROR:
> C:/Dev-Cpp/lib/libfltk.a(Fl.o)(.text+0x1310):Fl.cxx: multiple definition of 
> `Fl_Window::handle(int)'
> Untitled1.o(.text+0x0):Untitled1.cpp: first defined here
> collect2: ld returned 1 exit status

        Yes, that error is because you're trying to redefine 
Fl_Window::handle(),
        which is NOT what you should be doing.

        See also Ian's recommendations.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to