u010128242
折翅的飞蛾
采纳率40%
2015-04-15 09:47

vc++ 引入winuser.h编译出错

1
已采纳

源代码:
#include
#include
#include

int main()
{

return 0

}

编译错误:
hotkey.c
d:\vc6\vc6\vc98\include\winuser.h(39) : error C2061: syntax error : identifier 'HDWP'
d:\vc6\vc6\vc98\include\winuser.h(39) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(40) : error C2061: syntax error : identifier 'MENUTEMPLATEA'
d:\vc6\vc6\vc98\include\winuser.h(40) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(41) : error C2061: syntax error : identifier 'MENUTEMPLATEW'
d:\vc6\vc6\vc98\include\winuser.h(41) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(45) : error C2061: syntax error : identifier 'MENUTEMPLATE'
d:\vc6\vc6\vc98\include\winuser.h(45) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(47) : error C2061: syntax error : identifier 'LPMENUTEMPLATEA'
d:\vc6\vc6\vc98\include\winuser.h(47) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(48) : error C2061: syntax error : identifier 'LPMENUTEMPLATEW'
d:\vc6\vc6\vc98\include\winuser.h(48) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(52) : error C2061: syntax error : identifier 'LPMENUTEMPLATE'
d:\vc6\vc6\vc98\include\winuser.h(52) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(55) : error C2143: syntax error : missing ')' before '*'
d:\vc6\vc6\vc98\include\winuser.h(55) : error C2143: syntax error : missing '{' before '*'
d:\vc6\vc6\vc98\include\winuser.h(55) : error C2059: syntax error : ')'
d:\vc6\vc6\vc98\include\winuser.h(80) : error C2061: syntax error : identifier 'DLGPROC'
d:\vc6\vc6\vc98\include\winuser.h(80) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(81) : error C2061: syntax error : identifier 'TIMERPROC'
d:\vc6\vc6\vc98\include\winuser.h(81) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(82) : error C2061: syntax error : identifier 'GRAYSTRINGPROC'
d:\vc6\vc6\vc98\include\winuser.h(82) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(83) : error C2061: syntax error : identifier 'WNDENUMPROC'
d:\vc6\vc6\vc98\include\winuser.h(83) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(84) : error C2061: syntax error : identifier 'HOOKPROC'
d:\vc6\vc6\vc98\include\winuser.h(84) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(85) : error C2061: syntax error : identifier 'SENDASYNCPROC'
d:\vc6\vc6\vc98\include\winuser.h(85) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(87) : error C2061: syntax error : identifier 'EDITWORDBREAKPROCA'
d:\vc6\vc6\vc98\include\winuser.h(87) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(88) : error C2061: syntax error : identifier 'EDITWORDBREAKPROCW'
d:\vc6\vc6\vc98\include\winuser.h(88) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(90) : error C2061: syntax error : identifier 'PROPENUMPROCA'
d:\vc6\vc6\vc98\include\winuser.h(90) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(91) : error C2061: syntax error : identifier 'PROPENUMPROCW'
d:\vc6\vc6\vc98\include\winuser.h(91) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(93) : error C2061: syntax error : identifier 'PROPENUMPROCEXA'
d:\vc6\vc6\vc98\include\winuser.h(93) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(94) : error C2061: syntax error : identifier 'PROPENUMPROCEXW'
d:\vc6\vc6\vc98\include\winuser.h(94) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(97) : error C2061: syntax error : identifier 'DRAWSTATEPROC'
d:\vc6\vc6\vc98\include\winuser.h(97) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(106) : error C2061: syntax error : identifier 'PROPENUMPROC'
d:\vc6\vc6\vc98\include\winuser.h(106) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(107) : error C2061: syntax error : identifier 'PROPENUMPROCEX'
d:\vc6\vc6\vc98\include\winuser.h(107) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(108) : error C2061: syntax error : identifier 'EDITWORDBREAKPROC'
d:\vc6\vc6\vc98\include\winuser.h(108) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(124) : error C2061: syntax error : identifier 'NAMEENUMPROCA'
d:\vc6\vc6\vc98\include\winuser.h(124) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(125) : error C2061: syntax error : identifier 'NAMEENUMPROCW'
d:\vc6\vc6\vc98\include\winuser.h(125) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(126) : error C2061: syntax error : identifier 'WINSTAENUMPROCA'
d:\vc6\vc6\vc98\include\winuser.h(126) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(127) : error C2061: syntax error : identifier 'DESKTOPENUMPROCA'
d:\vc6\vc6\vc98\include\winuser.h(127) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(128) : error C2061: syntax error : identifier 'WINSTAENUMPROCW'
d:\vc6\vc6\vc98\include\winuser.h(128) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(129) : error C2061: syntax error : identifier 'DESKTOPENUMPROCW'
d:\vc6\vc6\vc98\include\winuser.h(129) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(140) : error C2061: syntax error : identifier 'WINSTAENUMPROC'
d:\vc6\vc6\vc98\include\winuser.h(140) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(141) : error C2061: syntax error : identifier 'DESKTOPENUMPROC'
d:\vc6\vc6\vc98\include\winuser.h(141) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(187) : error C2054: expected '(' to follow 'DECLSPEC_IMPORT'
d:\vc6\vc6\vc98\include\winuser.h(188) : error C2085: 'WINAPI' : not in formal parameter list
d:\vc6\vc6\vc98\include\winuser.h(188) : error C2146: syntax error : missing ',' before identifier 'wvsprintfA'
d:\vc6\vc6\vc98\include\winuser.h(188) : error C2143: syntax error : missing ';' before '('
d:\vc6\vc6\vc98\include\winuser.h(191) : error C2059: syntax error : ')'
d:\vc6\vc6\vc98\include\winuser.h(194) : error C2054: expected '(' to follow 'DECLSPEC_IMPORT'
d:\vc6\vc6\vc98\include\winuser.h(195) : error C2085: 'WINAPI' : not in formal parameter list
d:\vc6\vc6\vc98\include\winuser.h(195) : error C2146: syntax error : missing ',' before identifier 'wvsprintfW'
d:\vc6\vc6\vc98\include\winuser.h(195) : error C2143: syntax error : missing ';' before '('
d:\vc6\vc6\vc98\include\winuser.h(198) : error C2059: syntax error : ')'
d:\vc6\vc6\vc98\include\winuser.h(205) : error C2054: expected '(' to follow 'DECLSPEC_IMPORT'
d:\vc6\vc6\vc98\include\winuser.h(205) : error C2085: 'WINAPIV' : not in formal parameter list
d:\vc6\vc6\vc98\include\winuser.h(205) : error C2146: syntax error : missing ',' before identifier 'wsprintfA'
d:\vc6\vc6\vc98\include\winuser.h(205) : error C2143: syntax error : missing ';' before '('
d:\vc6\vc6\vc98\include\winuser.h(205) : error C2059: syntax error : ')'
d:\vc6\vc6\vc98\include\winuser.h(206) : error C2054: expected '(' to follow 'DECLSPEC_IMPORT'
d:\vc6\vc6\vc98\include\winuser.h(206) : error C2085: 'WINAPIV' : not in formal parameter list
d:\vc6\vc6\vc98\include\winuser.h(206) : error C2146: syntax error : missing ',' before identifier 'wsprintfW'
d:\vc6\vc6\vc98\include\winuser.h(206) : error C2143: syntax error : missing ';' before '('
d:\vc6\vc6\vc98\include\winuser.h(206) : error C2059: syntax error : ')'
d:\vc6\vc6\vc98\include\winuser.h(523) : error C2061: syntax error : identifier 'HWND'
d:\vc6\vc6\vc98\include\winuser.h(524) : error C2059: syntax error : '}'
d:\vc6\vc6\vc98\include\winuser.h(531) : error C2061: syntax error : identifier 'HWND'
d:\vc6\vc6\vc98\include\winuser.h(532) : error C2059: syntax error : '}'
d:\vc6\vc6\vc98\include\winuser.h(537) : error C2061: syntax error : identifier 'CBT_CREATEWND'
d:\vc6\vc6\vc98\include\winuser.h(537) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(538) : error C2061: syntax error : identifier 'LPCBT_CREATEWND'
d:\vc6\vc6\vc98\include\winuser.h(538) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(546) : error C2061: syntax error : identifier 'BOOL'
d:\vc6\vc6\vc98\include\winuser.h(547) : error C2061: syntax error : identifier 'hWndActive'
d:\vc6\vc6\vc98\include\winuser.h(547) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(548) : error C2059: syntax error : '}'
d:\vc6\vc6\vc98\include\winuser.h(587) : error C2061: syntax error : identifier 'UINT'
d:\vc6\vc6\vc98\include\winuser.h(588) : error C2061: syntax error : identifier 'paramL'
d:\vc6\vc6\vc98\include\winuser.h(588) : error C2059: syntax error : ';'
d:\vc6\vc6\vc98\include\winuser.h(589) : error C2061: syntax error : identifier 'paramH'
d:\vc6\vc6\vc98\include\winuser.h(589) : fatal error C1003: error count exceeds 100; stopping compilation
执行 cl.exe 时出错.

我是菜鸟,求大神解决~~

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • oyljerry oyljerry 6年前

    多加头文件

     #include <windows.h>
    
    点赞 2 评论 复制链接分享

相关推荐