WinNT.h错误 [英] WinNT.h errors

查看:484
本文介绍了WinNT.h错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在WinNT.h中定义的程序中使用了WCHAR,因此我包含了< WinNT.h> ;,这是我的整个程序,除此以外:

i use WCHAR in my program, which is defined in WinNT.h, so i include <WinNT.h>,  here is my whole  program and nothing else:

#include< winnt.h>

#include <winnt.h>

void main()
{
WCHAR p;
}

void main()
{
 WCHAR p;
}







但是当我构建解决方案时,我得到了以下错误信息:


错误1错误C2146:语法错误:缺少';'标识符'WCHAR'c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h之前296 Ch2_char_types_2
错误2错误C4430:缺少类型说明符-假定为int.注意:C ++不支持default-int c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h 296 Ch2_char_types_2
错误3错误C2143:语法错误:缺少';'在'*'c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h之前.299 Ch2_char_types_2
错误4错误C2040:'PWSTR':'CONST'在间接级别上与'WCHAR *不同c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h 299 Ch2_char_types_2
错误5错误C4430:缺少类型说明符-假定为int.注意:C ++不支持default-int c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h 299 Ch2_char_types_2
错误6错误C2143:语法错误:缺少';'在'*'c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h之前.301 Ch2_char_types_2
错误7错误C2371:'WCHAR':重新定义;不同的基本类型c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h 301 Ch2_char_types_2
错误8错误C4430:缺少类型说明符-假定为int.注意:C ++不支持default-int c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h 301 Ch2_char_types_2
错误9错误C4430:缺少类型说明符-假定为int.注意:C ++不支持default-int c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h 301 Ch2_char_types_2
错误10错误C2143:语法错误:缺少';'在'*'c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h之前.302 Ch2_char_types_2
错误11错误C4430:缺少类型说明符-假定为int.注意:C ++不支持default-int c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h 302 Ch2_char_types_2
错误12错误C2378:'PCWSTR':重新定义;不能使用typedef c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h来重载符号.302 Ch2_char_types_2
错误13错误C4430:缺少类型说明符-假定为int.注意:C ++不支持default-int c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h 302 Ch2_char_types_2
错误14错误C2143:语法错误:缺少';'在'*'c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h之前.303 Ch2_char_types_2
错误15错误C2371:'WCHAR':重新定义;不同的基本类型c:\ program files \ microsoft sdks \ windows \ v6.0a \ include \ winnt.h 303 Ch2_char_types_2
....(下面省略了很多错误)

推荐答案

还包括windows.h文件.
include the windows.h file also.


这篇关于WinNT.h错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆