I have an old C++ program I recovered to update and re-use it with Visual Studio 2019.
When I try to compile winnt.h
, it gives the error:
Windows headers require the default packing option. Changing this can lead to memory corruption. This diagnosis can be disabled by building with WINDOWS_IGNORE_PACKING_MISMATCH defined
I saw this post Static assertion failed with "Windows headers require the default packing option..." and I already changed the packing option from 4bytes to default ( Project Settings > C/C++ > Code Generation > Struct Member Alignment (change to Default) ).
What am I missing? How can I solve it?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.