-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MingW] error: 'WM_MOUSEHWHEEL' was not declared in this scope #1704
Comments
Thank you @Oldes, this is now fixed in all examples. I have a serious question even though it may look provocative or troll-ey, but why does ANYONE uses MingW? A good portion of the problems we have with building Windows examples are related to MingW, it's seems absurdly limited and stuck in the past. Is there any reason why a simple define that Microsoft added in 2007 wouldn't be supported by your version of MingW? Which version of MingW are you using? I am missing part of the picture here? |
Above was with this version:
For me MingW is a cross-platform compiler, I can use it to compile Windows app from Linux.. for example. I just searched MingW files for the
So it is quite possible that better fix would be to do the same check in |
…n Windows systems before Vista
@Oldes: AFAIR that's just happening because WM_MOUSEWHEEL was introduced only after WindowsXP. Usually when you program for Windows you specify your target version globally or in some kind of precompiled header through the two definitions WINVER and _WIN32_WINNT. Please see: https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt. If you P.S. Mingw can still be useful to cross-compile for Windows (64 or 32 bit) from other systems. [Edit:] Probably now everybody knows this already... |
Well I didn't (but I am not a MingW user) and apparently other people don't, so it's good you posted that because next that I'll have an answer. I am finding it a little silly that MINGW doesn't doesn't so the latest version it supports. |
@ocornut: I just meant the cross-compilation part, because I missed @Oldes's answer about that.
Yes, but I'm not sure that all the older cl.exe compilers set these definitions in the correct way too. |
The default value for e..g In theory, we should be explicitly setting _WIN32_WINNT everywhere in the examples but this is just getting in the way of experimentation with modern stuff (e.g. DPI, DWM for viewport/docking). The proposed change in #1708 is the theorical correct thing but in practice it seems that every portable application are defining chunks of windows header and use DLL loading themselves (as we are doing in the viewport branch) to allow compiling with older SDK (my current oldest target is VS2010) so it's fine to keep doing this. |
Compiling directX demos using MingW failes on missing
WM_MOUSEHWHEEL
definition.Possible fix is adding this code into header file:
With this code it is possible to compile the demo without any other problems.
The text was updated successfully, but these errors were encountered: