On 27 Nov 2011, at 21:03, fltkgui wrote:
> gui_demo.cxx:210:88: error: no matching function for call to
> ‘Fl_JPEG_Image::Fl_JPEG_Image(const char [20], unsigned char [3389])’
> /usr/include/FL/Fl_JPEG_Image.H:36:3: note: candidates are:
> Fl_JPEG_Image::Fl_JPEG_Image(const char*)
> /usr/include/FL/Fl_JPEG_Image.H:32:53: note:
> Fl_JPEG_Image::Fl_JPEG_Image(const Fl_JPEG_Image&)
Be interesting to see how you have called the constructor for your Jpeg images,
since that's what it is complaining about.
And which version of fltk you are using, or course.
I assume that what you are trying to do is load an image from RAM, using this
constructor form:
Fl_JPEG_Image (const char *name, const unsigned char *data);
However, that form is fairly new, and was not available in fltk-1.1.x, so
unless you are using fltk-1.3.x that is not going to work.
For that to work, you need to have stored your JPEG image data into RAM at the
location pointed to by "data", so if you are just loading images from disk,
this is probably the wrong method.
If you are trying to load JPEG images that are in RAM (e.g. binary blobs
embedded in your app, or data received over a socket or something) then this is
the right method, and really should Just Work.
Loading images from file is more generally supported, just using:
Fl_JPEG_Image (const char *filename);
So I'd try that first, just to make sure the image libs are working. And if you
are using fltk-1.1.x, then that's your best (only?) option anyway...
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk