MacArthur, Ian (SELEX GALILEO, UK) wrote: > However, that said, when I check the logs for my recent builds, I see > that fltk-2 does not currently build for me on winXX. Someone (Yuri, I > think) has checked in changes to the cursor code in Cursor.cxx and that > chokes for me. > > Compiling Cursor.cxx... > Cursor.cxx:281:2: warning: #warning we assume PixelType = 6 ARGB32 in > test it is true for color images > Cursor.cxx: In function `HICON__* create_cursor_from_image(fltk::Image*, > int, int)': > Cursor.cxx:287: error: `BITMAPV5HEADER' undeclared (first use this > function) > Cursor.cxx:287: error: (Each undeclared identifier is reported only once > for each function it appears in.) > Cursor.cxx:287: error: expected `;' before "bi" > Cursor.cxx:291: error: `bi' undeclared (first use this function) > Cursor.cxx:315: warning: unused variable 'h' > make[1]: *** [Cursor.o] Error 1 > make: *** [all] Error 2 > > Looks like a missing or incorrect header file to me for BITMAPV5HEADER, > although I don't know what.
This is strange, it builds with only a few warnings for me with cygwin, one of them being the "#warning" that should be guarded by "#ifdef __GNU???", as we found out a while ago. Here are my warnings: Cursor.cxx:281:2: warning: #warning we assume PixelType = 6 ARGB32 in test it is true for color images Cursor.cxx: In function `HICON__* create_cursor_from_image(fltk::Image*, int, int)': Cursor.cxx:315: warning: unused variable 'h' > Actually, if Yuri has been testing this on a VC build, it might just > work for that build case now? Presumably to test this he must have fixed > the broken project files anyway? Yuri wrote in http://www.fltk.org/str.php?L1385 that he tested it with mingw32. > Did you (Gerry) try it? Does it currently build under VC or not? (I > don't have VC on this box to try it...) Ian, if you don't have BITMAPV5HEADER for some obscure reason (maybe an older mingw32 runtime / header files ?), would the appended patch fix it? (Maybe one line wraps, and if you cut'n'paste it, you may need to fix cr/lf). It's basically changing V5 to V4 and (greetings from MS :-) ) changing "bi.bV5Compression" to "bi.bV4V4Compression" (yes, double V4 !). Albrecht $ svn diff Index: src/Cursor.cxx =================================================================== --- src/Cursor.cxx (revision 6793) +++ src/Cursor.cxx (working copy) @@ -284,23 +284,23 @@ static HCURSOR create_cursor_from_image(Image *img, int x, int y) { - BITMAPV5HEADER bi; + BITMAPV4HEADER bi; HBITMAP hBitmap; const int cw = 32, ch = 32; // Hm it seams only one size of cursors for Windows - ZeroMemory(&bi,sizeof(BITMAPV5HEADER)); - bi.bV5Size = sizeof(BITMAPV5HEADER); - bi.bV5Width = cw; - bi.bV5Height = ch; - bi.bV5Planes = 1; - bi.bV5BitCount = 32; - bi.bV5Compression = BI_BITFIELDS; + ZeroMemory(&bi,sizeof(BITMAPV4HEADER)); + bi.bV4Size = sizeof(BITMAPV4HEADER); + bi.bV4Width = cw; + bi.bV4Height = ch; + bi.bV4Planes = 1; + bi.bV4BitCount = 32; + bi.bV4V4Compression = BI_BITFIELDS; // The following mask specification specifies a supported 32 BPP // alpha format for Windows XP. - bi.bV5RedMask = 0x00FF0000; - bi.bV5GreenMask = 0x0000FF00; - bi.bV5BlueMask = 0x000000FF; - bi.bV5AlphaMask = 0xFF000000; + bi.bV4RedMask = 0x00FF0000; + bi.bV4GreenMask = 0x0000FF00; + bi.bV4BlueMask = 0x000000FF; + bi.bV4AlphaMask = 0xFF000000; HDC hdc; hdc = GetDC(NULL); _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

