including <Windows.h> gives error.
-
@BigBen
Not sure where that is coming from, given that you say it's not to do withstd::byte
.Start by where do you
#include <Windows.h>
? Try putting it before any other#include
s, try putting it after all of them, any difference? Try a standalone program with just#include <Windows.h>
initially, then add in various Qt includes. Doesn't the error message give any further details about where the error occurs, wherebyte
is being defined? Etc. -
@BigBen said in including <Windows.h> gives error.:
reference to 'byte' is ambiguous
thats Microsofts fault their MSVC implementation of std::byte that came with c++17 is ds.
you can, if you're not using byte in your user defined code add
#define _HAS_STD_BYTE 0
before the problematic include, that should work.