On 23.05.2011 at 13:56, Ian MacArthur wrote: >> Compiling Fl.cxx... >> Fl.cxx:41:1: warning: "WINVER" redefined >> In file included from >> d:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windows.h:48, >> from D:/msys/1.0/local/include/cairo/cairo-win32.h:44, >> from ../FL/Fl_Cairo.H:44, >> from ../FL/Fl.H:36, >> from Fl.cxx:34: >> d:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windef.h:12:1: >> warning: this is the location of the previous definition > > > OK, it looks like this code in Fl.cxx maybe needs to be set a few lines > erlier, to ensure that we #define WINVER *before* we include<FL/Fl.H>, rather > than doing it before we include<FL/x.H>. > > /* We require Windows 2000 features (e.g. VK definitions) */ > #if defined(WIN32) > # if !defined(WINVER) || (WINVER< 0x0500) > # define WINVER 0x0500 > # endif > # if !defined(_WIN32_WINNT) || (_WIN32_WINNT< 0x0500) > # define _WIN32_WINNT 0x0500 > # endif > #endif
[...] > Testing... OK - seems to work, but... I'd need advice from someone who > actually knows what's going on here; Albrecht? Looks like you know this stuff? Please try this patch instead: $ svn diff src/Fl.cxx Index: src/Fl.cxx =================================================================== --- src/Fl.cxx (revision 8720) +++ src/Fl.cxx (working copy) @@ -38,6 +38,9 @@ /* We require Windows 2000 features (e.g. VK definitions) */ #if defined(WIN32) # if !defined(WINVER) || (WINVER < 0x0500) +# ifdef WINVER +# undef WINVER +# endif # define WINVER 0x0500 # endif # if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500) Reasoning: the given code (added recently) seems to be broken since it DOES redefine WINVER if it has been defined before (WINVER < 0x0500). #undef ought to fix that. And, BTW, this seems to have been copied from another place (search for WINVER), the same would of course also apply to _WIN32_WINNT. Jiggling around with include orders doesn't help much in this case, IMHO. Whether the definition of WINVER and _WIN32_WINNT is correct, I cannot say. Albrecht _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev