FLTK logo

Re: [fltk.coredev] Re: fltk-1.4 build error in Fl_WinAPI_System_Driver.cxx with 32-bit mingw

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Re: fltk-1.4 build error in Fl_WinAPI_System_Driver.cxx with 32-bit mingw Albrecht Schlosser Apr 20, 2023  
 
On 4/20/23 14:37 imacarthur wrote:
On Thursday, 20 April 2023 at 13:25:48 UTC+1 imacarthur wrote:

We probably need to do something like (untested):

#ifdef _WIN32
#  if !(defined _WIN32_IE) || (_WIN32_IE < 0x0500)
#      undef _WIN32_IE
#      define _WIN32_IE  0x0500
#  endif /* _WIN32_WINNT checks */
#endif /* _WIN32 */


At the top of Fl_WinAPI_System_Driver.cxx as a workaround for this?

FWIW, I tried this tweak, and it seems to work.

OK, great that you found this. I agree that we could do this and have two notes:

(1) We probably don't need '#ifdef _WIN32' because this file is only compiled under Windows anyway (we also include <windows.h> and more).

(2) I checked that 'SHGFP_TYPE_CURRENT == 0', hence we could replace the constant (name) with 0 and add a comment which would have the same effect.

Ian, can you please try option (2) just to be sure?

That said, I do wonder if the issue is more to do with the mingw32 headers than with fltk per se.
I'm not convinced that enum definition should be guarded by the _WIN32_IE macro check at all...

It's presumably done because these constants/functions didn't exist in versions older than '0x0500' which is IIRC Win XP or something like that.

(And I do not have the "real" MS headers here to compare against, either.)

Neither do I on this machine. However, I checked this with MinGW cross-compilation on Linux (Debian 12 / Bookworm aka 'testing').

How old are your MinGW header files? Maybe they are too old to "know" about these features?

Anyway, we should try to fix this in one or the other way. The cleaner solution would probably be to define the constant as you suggested in your workaround.

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/14001be1-8e60-5412-2c85-9b10e857e3cb%40online.de.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.