On Sun, 31 May 2009 10:47:30 -0700, Mat Nieuwenhoven wrote: >On Sat, 30 May 2009 11:50:46 -0700, Mat Nieuwenhoven wrote: > >>Hi, >> >>I synced today fltk-1.1 to revision 6791 . When building with Watcom 1.8, >>it complained about a missing multimon.h , which is included from >>screen_xywh.cxx . I cannot find multimon.h in the fltk-1.1 tree on disk. Is >>my source out of sync or is something else wrong? > >Hi Greg and Albrecht, > >Thanks for replying. I've found the problem, HMONITOR_DECLARED is not >defined in OpenWatcom 1.8. In OW versions prior to 1.8, the Win32 API >headers were derived from the MinGW ones. From 1.8, a complete new set was >made not derived from MinGW. > >In windef.h from OW17 it goes like this (unconditionally declaration): >DECLARE_HANDLE(HMONITOR); >#define HMONITOR_DECLARED 1 > >In OW18 is is: >#if (WINVER >= 0x0500) >DECLARE_HANDLE( HMONITOR ); > >Note that even if WINVER >= 0x0500, HMONITOR_DECLARED is not defined even >though DECLARE_HANDLE( HMONITOR ) is done. This could be a mistake. I'll >raise in the OW contributors newsgroup. >No OW version frm 1.0 onwards ever supplied multimon.h, I'll raise this >also. > >The probable best workaround is to change the Watcom makefile in src to >define WINVER. For 1.8 also a backwards compatible small change is needed >in watcom.mif. I'll test it and let you know.
Hi, It turns out that with two small changes in watcom.mif both OpenWatcom 1.8 and 1.7 and earlier can be used. Change 1, line 135, change from SYSDEF= -DWIN32 to SYSDEF= -DWIN32 -D_WIN32_WINNT=0x0500 -DWINVER=0x0500 Change 2, line 228 , replace !loaddll wlink wlink with !ifeqi __VERSION__ 1280 !loaddll wlink wlinkd !else !loaddll wlink wlink !endif With these changes everything compiles (libs, fluid and all test programs) in both debug and release mode, tested with OW 1.7 and 1.8 . Example files sizes are 601k for fluid.exe and 147 k for hello.exe. Some notes on screen_xywh.cxx, lines 38 and following: - HMONITOR_DECLARED is a mingw special. As it doesn't exist in MS and OW strives to be MS compatible, it was removed from the OW 1.8 headers. - The same line tests for _WIN32_WINNT < 0x0500 , and a few lines further the code has MONITORENUMPROC . This is defined in winuser.h provided WINVER >= 0x0500 . Is there a reason why the first test is not also using WINVER? Mat Nieuwenhoven _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
