I received errors like that if I set the the VS C/C++ language standard to disable language extensions. I have that set default to Yes so every new project/solution disables language extensions.*
Disable (say No) and the demo code compiled fine. And the library functions (most of them) worked as expected when the exe was launched for the VS IDE. Launch the exe by any other means and a lot of the functions crapped out. Compiled with 2019 or 2022.
*Disabling language extensions makes in my experience any WinAPI code bomb, the API is chock full of language extensions.
Just for Gits and Shiggles I tried the demo and header in Code::Blocks. Bomb-o! Same results when launching the app outside of the VS IDE.
It looks as if the console window launched from the VS IDE is non-standard. Sure would have been nice if the header actually worked "generically".
Console VT100 support only works with Windows 10 since build 1511. You need to enable it first before usage by setting console output mode to ENABLE_VIRTUAL_TERMINAL_PROCESSING