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
>
> Following Ian's advice to consider jmorecfg.h, I looked in mingw's  
> version
> and found a possible explanation:
>
> """
> /*
>  * On a few systems, type boolean and/or its values FALSE, TRUE may  
> appear
>  * in standard header files.  Or you may have conflicts with  
> application-
>  * specific header files that you want to include together with  
> these files.
>  * Defining HAVE_BOOLEAN before including jpeglib.h should make it  
> work.
>  */
> typedef int jpeg_boolean;
>      :
> """
>
> I see that "typedef boolean ..." or something similar is nowhere to  
> be found.

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.

Great.
I don't know where we go from here.
I wish we could learn to leave the "stock" libraries alone though....
-- 
Ian


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

Reply via email to