After including winnt.h, the compiler reports a lot of syntax errors, Error C2146, C4430, C2059, C2062, etc., which occur with various versions of visual studio, including vc6, 2010, 2017, 2019. But the compilation result has no other error location except winnt.h.
If you can’t try many methods, you can try the following:
Note the order of header files:
When importing files, it needs to be consistent with the running logic of the main program as follows:
Read More:
- [Solved] error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory
- [Solved] fatal error C1083: Cannot open included files: “stdafx.h”: No such file or directory
- [Solved] utils.c:33:18: fatal error: zlib.h: No such file or directory
- [Solved] Linux R Pack Error: cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directory
- [Solved] GBase 8a MPP Database sftp Loading Large File Error
- bazel Compile Error: absl/base/policy_checks.h:79:2: error: #error “C++ versions less than C++14 are not supported.”
- Error (active) e1696 cannot open source file “errno.H” rpgworld problems encountered in installing visual studio 2017
- ApplicationContext.xml file header error Referenced file contains errors
- [Solved] Error: Waveform5.vwf.vt(30): near “1“: syntax error, unexpected INTEGER NUMBER, expecting ‘)‘ Erro
- crtdbg.h No such file or directory error [How to Solve]
- [Solved] Keil C Error: error C141: syntax error near ‘=‘, expected ‘__asm‘
- [Solved] 1.fatal error: NvInfer.h: No such file or directory
- C# Error: Import “google/protobuf/timestamp.proto“ was not found or had errors. [How to Solve]
- [Solved] spring boot – JPA–H2 Error: H2 error: “Syntax error in SQL statement … expected identifier“
- [Solved] Compile Error: cannot open include file ‘afxres.h‘
- fatal error: libusb.h: No such file or directory [How to Solve]
- IOS Adds C File Error [How to Solve]
- file_name.sh: 3: Syntax error: “(“ unexpected [How to Solve]
- [Solved] VScode Run C++ File Error: fatal error:opencv2\core.hpp:No such file or diretory