Mat Nieuwenhoven wrote: >> [...] 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
This would mean that OpenWatcom could only be used to compile with/for Windows 2000/XP and higher. Would it be possible to use a conditional statement like below, so that this would only be added for OpenWatcom >= 1.8? > Change 2, line 228 , replace > !loaddll wlink wlink > with > !ifeqi __VERSION__ 1280 > !loaddll wlink wlinkd > !else > !loaddll wlink wlink > !endif I see, and I noticed on the Watcom site that 1280 is the version number for OpenWatcom 1.8. IMHO it would be better to have a comparison, such that it would work for 1.8 and later versions (or the old version for OpenWatcom < 1.8). What would be the correct comparison? > 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. Thanks for your testing and feedback. I'd like to apply your (modified) fixes to FLTK 1.1 and FLTK 1.3, if you can answer the questions above. TIA > 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? I don't know, and maybe we don't need this anymore. According to MS [1], the values of _WIN32_WINNT and WINVER appear to be the same, anyway. Probably we can remove all this multimon.h stuff, beginning with FLTK 1.3, because we don't want to support these older (pre-W2K) Windows versions officially anymore. And, BTW, according to [2], "Beginning with Visual C++ 2008, Visual C++ does not support targeting Windows 95, Windows 98, Windows ME, or Windows NT." Albrecht P.S. Sorry for the long delay. [1] http://msdn.microsoft.com/en-us/library/aa383745.aspx [2] http://msdn.microsoft.com/en-us/library/6sehtctf.aspx _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
