Menu

[Linker error] with FLTK and hello.cxx

2002-09-23
2012-09-26
  • Nobody/Anonymous

    Good morning everyone,
    I have Dev-C++ 4.9.5.0 and FLTK 1.1.0 Release Candidate 4 installed on the win98 and when trying to compile Hello.cxx created with copy&paste method from the FLTK documentation compiler gives following error:

    [Linker error] undefined reference to `Fl_Window::Fl_Window(int, int, char const *)'
    [Linker error] undefined reference to `fl_define_FL_SHADOW_LABEL(void)'
    [Linker error] undefined reference to `Fl_Window::show(int, char **)'
    [Linker error] undefined reference to `Fl::run(void)'
    [Linker error] undefined reference to `Fl_Group::current_'
    [Linker error] undefined reference to `Fl_Widget::Fl_Widget(int, int, int, int, char const *)'
    [Linker error] undefined reference to `Fl_Widget::~Fl_Widget(void)'
    [Linker error] undefined reference to `Fl_Box::draw(void)'
    [Linker error] undefined reference to `Fl_Box::handle(int)'
    [Linker error] undefined reference to `Fl_Widget::resize(int, int, int, int)'
    [Linker error] undefined reference to `Fl_Widget::~Fl_Widget(void)'

    Am I missing some detail of configuration or something?

    Thanks already.

    Source of hello.cxx :

    #include "FL\Fl.H"
    #include "FL\Fl_Window.H"
    #include "FL\Fl_Box.H"
    int main(int argc, char **argv) {
    Fl_Window *window = new Fl_Window(300,180);
    Fl_Box *box = new Fl_Box(20,40,260,100,"Hello, World!");
    box->box(FL_UP_BOX);
    box->labelsize(36);
    box->labelfont(FL_BOLD+FL_ITALIC);
    box->labeltype(FL_SHADOW_LABEL);
    window->end();
    window->show(argc, argv);
    return Fl::run();
    }

     
    • Nobody/Anonymous

      Try to use the FLTK DevPack for DEV-C++. This works fine. It sets all neccesary options in the environment.

       
    • Nobody/Anonymous

      Well... in fact I used DevPack and Package Manager for installing...

      Did you said that You got it compiled? (when saying 'This works fine')

       
    • Nobody/Anonymous

      Yes, my DEV compiled that sourcecode without problems. A selfmade test prog did compile as well even I've changed the form-definitions.

       
    • Nobody/Anonymous

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.