On 23.05.2011 at 16:44, MacArthur, Ian (SELEX GALILEO, UK) wrote: >> Please try this patch instead: > > No, that does not work. I just get: > > === making src === > Compiling Fl.cxx... > In file included from Fl.cxx:1709: > Fl_win32.cxx:754: error: `VK_BROWSER_BACK' was not declared in this scope
[...] > Fl_win32.cxx:768: error: `VK_LAUNCH_MAIL' was not declared in this scope > make[1]: *** [Fl.o] Error 1 > make: *** [all] Error 1 But it fixed the redefinition problem ;-) , didn't it ? > So, I still think the problem is that we set/change the value of WINVER > *after* we have already included<FL/Fl.H> because if --enable-cairo is > set, that (indirectly, via nested includes in the cairo headers) > includes windows.h. > > So subsequent attempts to include windows.h with a different value of > WINVER set fail, since the ifdef include guards are already set... > > So we need to set the vale of WINVER *before* we included<FL/Fl.H> or > it will not work. > > I could be missing the point, of course... I don't think so - setting WINVER should probably be done before including *any* header that might include windows.h. Hence your fix is probably correct, and I don't see any reason not to apply it. > Note: this thing about redefining WINVER, even if it is set already, > without undefing it; I have seen that in a lot of windows headers, and > it always looks odd, but it appears to be "acceptable" to the windows > compilers. > I do not know... No, that doesn't work, I just tested it. This *should* be fixed as well. $ uname -a MINGW32_NT-5.1 MY-PC 1.0.16(0.48/3/2) 2010-09-29 00:07 i686 Msys $ cat winver.c #define WINVER 1 /* 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 int main() { return 0; } $ gcc --version gcc.exe (GCC) 4.5.2 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc -o winver winver.c winver.c:7:0: warning: "WINVER" redefined winver.c:2:0: note: this is the location of the previous definition I'd appreciate if you could just do both of it, including the _WIN32_WINNT definition (and maybe fixing the other occurrences, too)? I have two more STR's (2632 and 2637) that I want to fix/finish tonight before Matt can do RC6. Albrecht _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev