James wrote:
> Code:
>
> #include <FL/Fl.H>
> #include <FL/Fl_Window.H>
> #include <FL/Fl_Box.H>
> #include <FL/Fl_Button.H>
> #include <FL/Fl_PNG_Image.H>
> #include <FL/Fl_Text_Display.H>
>
> int main(int argc, char ** argv)
> {
>
> const char *dir = "./img/facia.png";
>
> Fl_Window *window;
> Fl_PNG_Image *facia;
> facia = new Fl_PNG_Image(dir);
> window = new Fl_Window(623, 464);
> window->image(facia);
>
> window->end();
> window->show(argc, argv);
>
> return(Fl::run());
>
> }
>
> The code returns the error:
>
> [Linker error] Undefined reference to "Fl_PNG_Image::Fl_PNG_Image(char
> const*)"
>
> Any solutions would be greatly appreciated
This is a linker error, because you didn't specify the image libs.
fltk-config --use-images --compile test.cxx
works for me. Use
fltk-config --use-images --ldflags
to show what you need.
Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk