On 22.06.2010, at 21:51, imacarthur wrote: > > On 22 Jun 2010, at 19:17, Jim Wilson wrote: > > >> OK. I got it. after "mingw-configure" (without "--enable-localjpeg) >> and another bout of hand editing, after "rm src/Fl_JPEG_Image.o": >> >> $ mingw32-make >> === making src === >> Compiling Fl_JPEG_Image.cxx... >> Fl_JPEG_Image.cxx: In constructor 'Fl_JPEG_Image::Fl_JPEG_Image(const >> char*)': >> Fl_JPEG_Image.cxx:158: error: 'boolean' was not declared in this scope >> Fl_JPEG_Image.cxx:158: error: expected ';' before numeric constant >> make[1]: *** [Fl_JPEG_Image.o] Error 1 >> make: *** [all] Error 1
--- snipped --- > Yup - and the line you posted, where "jpeg_boolean" is declared, is > exactly the place that "boolean" would be getting declared in an > "unmolested" jpeg lib... > > OK... Just so I have this clear... > > So we are saying that the version of jmorecfg.h that is bundled with the > mingw cross-compiler on your linux box (and presumably all the other > jpeg lib files that use "boolean", which is most of them...) have been > bodged to rename "boolean" as "jpeg_boolean", presumably in an attempt > to dodge some other name collision elsewhere. > > And, the fltk code in Fl_JPEG_Image.cxx expects to be able to use the > name "boolean" for this typedef, but since it is renamed in your > mingw-cross environment, the fltk build fails. > > But, if you use the fltk built-in jpeg lib (other bodges applied by the > fltk team notwithstanding...) then it all builds OK. Yup, that's exactly how I see the case. > Great. > I don't know where we go from here. > I wish we could learn to leave the "stock" libraries alone though.... That would be fine... That said, to answer Jim's primary question: yes, IMHO your setup is hosed. This MinGW-cross-libjpeg is IMHO seriously broken. They changed a public API, thus breaking API-conform programs. :-( What to do? I think you know already, but to make it complete, maybe for later readers: (a) configure with --enable-localjpeg (uses libjpeg 6b). I do this all the time. It has the additional advantage of (easier) static linking with the image libs and makes your programs independent of the libjpeg version installed on the target system. (b) patch the FLTK code - add "typedef char[int] boolean;" just before or after "#include <jpeglib.h>" in src/Fl_JPEG_Image.cxx. That's just the minimal patch you can do to make it work with your MinGW cross environment. Maybe. (c) patch the MinGW libjpeg code - add "typedef char[int] boolean;" just before or after "typedef int jpeg_boolean;". This will probably create errors compiling other MinGW (patched or unpatched) sources. (d) ask the MinGW people to fix this in another way, leaving the libjpeg API intact. This would probably need some time, if it worked at all. Anyway, there's nothing we (the FLTK team) can do. Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

