I have working code similar to yours ie. code that displays a texture on a 
widget, but referencing fltk::register_images() gives me a link error that I am 
avoiding by putting xpmFileImage.cxx in my source.

What libraries are you linking with in order to avoid the following error?

/usr/local/lib/libfltk2_images.a(xpmFileImage.o): In function 
`fltk::xpmFileImage::fetch()':
xpmFileImage.cxx:(.text+0x85): undefined reference to 
`fltk::xpmImage::fetch(fltk::Image&, char const* const*)'
xpmFileImage.cxx:(.text+0x2e1): undefined reference to 
`fltk::xpmImage::fetch(fltk::Image&, char const* const*)'
xpmFileImage.cxx:(.text+0x3af): undefined reference to 
`fltk::xpmImage::fetch(fltk::Image&, char const* const*)'


Thanks much.

tm

>       This works for me; shows the image in a borderless window.
>       Code based on the buttons.cxx example.
>
> #include <fltk/run.h>
> #include <fltk/Window.h>
> #include <fltk/SharedImage.h>
> int main() {
>     fltk::register_images();
>     fltk::Window win(720,486);
>     win.border(0);                    // borderless window
>     win.image(*fltk::SharedImage::get("/var/tmp/foo.jpg"));
>     win.end();
>     win.show();
>     return(fltk::run());
> }

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to