Closed Tectu closed 3 years ago
Yeah its a warning emitted by boost somewhere iirc (probably asio for the socket code). It wants to know what windows version (and crucially what features) we have. See the msdn docs on the matter. I'm not sure if there is an advantage to having a version higher than 7 when using asio, and I couldn't find anything in the docs (although they are pretty sparse).
I think malloy should probably offer a cmake option for this, since we can't really make decisions about what windows version the user has (or wants to expose) for them. It could cause issues though if the package is built with a version separate from the version used by the user when including the headers, if asio does things like change class layouts based on it for example.
I suggest we add an option which defaults to 0x0A00
(windows 10) and use it define _WIN32_WINNT
. imo this should be a public define so users can't accidentally build with possibly conflicting versions.
Interesting. Gotta love Windows :p
As far as I can tell it is indeed a good idea to have a cmake
option for this with defaulting to 0xA00
.
Currently working on this. After setting _WIN32_WINNT
to 0xA00
the MSVC CI now fails with:
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winuser.h(4379): error C2061: syntax error: identifier 'LPWNDCLASSEXA'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winuser.h(4387): error C2061: syntax error: identifier 'LPWNDCLASSEXW'
D:\a\malloy\malloy\3rdparty\boost-1.74.0\boost/asio/detail/impl/win_thread.ipp(54): error C2039: 'QueueUserAPC': is not a member of '`global namespace''
D:\a\malloy\malloy\3rdparty\boost-1.74.0\boost/asio/detail/impl/win_thread.ipp(54): error C3861: 'QueueUserAPC': identifier not found
Fixed in 49a7f7db677a5493af6658e0d07c7e5dbcfa988f
Looking at the build output of the various MSVC based CI actions, I see a lot of these messages:
@0x00002a as you're the MSVC guru here - any input on this?