Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including <Windows.h> causes (unknown attribute"no_init_all") error

Title says it all, started a new project in VS2017, included <iostream>, then when I went to include <Windows.h> (This is my first attempt at working with this header by the way), I got the error saying: unknown attribute"no_init_all" Any idea what might be causing this?

like image 427
The Riser Avatar asked Apr 28 '20 16:04

The Riser


1 Answers

OK, putting those comments into an answer ...

This bug is fixed in VS 2019, but as per this answer, in VS 2017 you can use:

#define no_init_all deprecated

or even just:

#define no_init_all
like image 58
Nick Westgate Avatar answered Nov 01 '22 11:11

Nick Westgate