With C++ 17, C2872: ‘byte’:ambiguous symbole errors appear in many of .h files.
Would you suggest how I overcome that and make a successful compile, other than downgrading to C++14?
Thank you.
With C++ 17, C2872: ‘byte’:ambiguous symbole errors appear in many of .h files.
Would you suggest how I overcome that and make a successful compile, other than downgrading to C++14?
Thank you.
@zubay00
Maybe you can try to set _HAS_STD_BYTE=0 macro in your project. We set this and try in our side which works fine.
I am not a professional programmer so that my knowledge is quite limited.
Where do I have to place the macro? Do I have to modify all .h files with the errors?
The .h files are found in C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0…
Is it ok for me to modify the files myself and not affecting normal running of my OS?
@zubay00
Hi,you do not need to modify any code.
You can add _HAS_STD_BYTE=0 to your Visual Studio Project: Right click your project -> Properties
-> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions
Please refer to the picture attached, hope to help you.
set.png (26.2 KB)
Thank you very much for your kind information.
That worked well.
You are welcome and good to know that you have sorted it out by following the instructions.