> One of my trees builds fltk-1.3 from svn, with the --enable-cairo option > selected. > > It is currently failing to build on win32/mingw with the following > errors: > > $ make > =3D=3D=3D making src =3D=3D=3D > 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 // recent versions of MinGW warn: "Please include winsock2.h before windows.h", // hence we must include winsock2.h before FL/x.H (A.S. Dec. 2010) #if defined(WIN32) && !defined(__CYGWIN__) # include <winsock2.h> #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? -- Ian _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
