错误C2061 [英] error C2061

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

问题描述

大家好,


当我收到头文件时,我收到以下错误

winuser.h

我不知道发生了什么事。如何在winuser.h中发生错误?

请帮助。

\ microsoft visual studio\vc98\include\winuser.h(39):错误C2061:

语法错误:标识符''HDWP''

\ microsoft visual studio\vc98\include\winuser.h(39):错误C2059 :

语法错误:'';''

\ microsoft visual studio\vc98\include\winuser.h(40):错误C2061:

语法错误:标识符''MENUTEMPLATEA''

\ microsoft visual studio\vc98\include\winuser.h(40):错误C2059:

语法错误:'';''

\ microsoft visual studio\vc98\include\winuser.h(41):错误C2061:

语法错误:标识符''MENUTEMPLATEW''

\ microsoft visual studio\vc98\include\winuser.h(41):错误C2059:

语法错误:'';''

\ microsoft visual studio\vc9 8\include\winuser.h(45):错误C2061:

语法错误:标识符''MENUTEMPLATE''

\ microsoft visual studio\vc98\\ \\include\winuser.h(45):错误C2059:

语法错误:'';''

\ microsros visual studio\vc98\include \\ \\ winuser.h(47):错误C2061:

语法错误:标识符''LPMENUTEMPLATEA''

\ microsoft visual studio\vc98\include\winuser .h(47):错误C2059:

语法错误:'';''

\ microsoft visual studio\vc98\include\winuser.h( 48):错误C2061:

语法错误:标识符''LPMENUTEMPLATEW''

\ microsoft visual studio\vc98\include\winuser.h(48) :错误C2059:

语法错误:'';''

\ microsoft visual studio\vc98\include\winuser.h(52):错误C2061 :

语法错误:标识符''LPMENUTE MPLATE''

\ microsoft visual studio\vc98\include\winuser.h(52):错误C2059:

语法错误:'';''

\ microsoft visual studio\vc98\include\winuser.h(55):错误C2143:

语法错误:缺少'')''''之前' '*''

\ microsoft visual studio\vc98\include\winuser.h(55):错误C2143:

语法错误:缺少''{ ''之前''*''

\ microsoft visual studio\vc98\include\winuser.h(55):错误C2059:

语法错误: '')''

\ microsoft visual studio\vc98\include\winuser.h(80):错误C2061:

语法错误:标识符'' DLGPROC''

\ microsoft visual studio\vc98\include\winuser.h(80):错误C2059:

语法错误:'';''

\ microsoft visual studio\vc98\include\winuser.h(81):错误C2061:

语法错误:标识符''TIMERPROC''

\ microsoft visual studio\vc98\include\winuser.h(81):错误C2059 :

语法错误:'';''

\ microsoft visual studio\vc98\include\winuser.h(82):错误C2061:

语法错误:标识符''GRAYSTRINGPROC''

\ microsoft visual studio\vc98\include\winuser.h(82):错误C2059:

语法错误:'';''

\ microsoft visual studio\vc98\include\winuser.h(83):错误C2061:

语法错误:标识符''WNDENUMPROC''

\ microsoft visual studio \vc98 \include\winuser.h(83):错误C2059:

语法错误:'';''

\ microsoft visual studio\vc98\include\winuser.h(84):错误C2061:

语法错误:标识符''HOOKPROC''

\ microsoft visual st udio\vc98\include\winuser.h(84):错误C2059:

语法错误:'';''

\ microsoft visual studio \ vc98 \include\winuser.h(85):错误C2061:

语法错误:标识符''SENDASYNCPROC''

\ microsoft visual studio\vc98 \\ \\include\winuser.h(85):错误C2059:

语法错误:'';''

\ microsros visual studio\vc98\include \\ \\ winuser.h(87):错误C2061:

语法错误:标识符''EDITWORDBREAKPROCA''

\ microsoft visual studio\vc98\include\winuser .h(87):错误C2059:

语法错误:'';''

\ microsoft visual studio\vc98\include\winuser.h( 88):错误C2061:

语法错误:标识符''EDITWORDBREAKPROCW''

\ microsoft visual studio\vc98\include\winuser.h(88) :错误C2059:

语法错误:' ;''

\ microsoft visual studio\vc98\include\winuser.h(90):错误C2061:

语法错误:标识符''PROPENUMPROCA' '

\ microsoft visual studio\vc98\include\winuser.h(90):错误C2059:

语法错误:'';''

\ microsoft visual studio\vc98\include\winuser.h(91):错误C2061:

语法错误:标识符''PROPENUMPROCW''

\ microsoft visual studio\vc98\include\winuser.h(91):错误C2059:

语法错误:'';''

谢谢,

Maddy

Hi All,

I am getting the following errors when i am including header file
winuser.h
I dont know whats happening. How will an error occur in winuser.h??
Please help.
\microsoft visual studio\vc98\include\winuser.h(39) : error C2061:
syntax error : identifier ''HDWP''
\microsoft visual studio\vc98\include\winuser.h(39) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(40) : error C2061:
syntax error : identifier ''MENUTEMPLATEA''
\microsoft visual studio\vc98\include\winuser.h(40) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(41) : error C2061:
syntax error : identifier ''MENUTEMPLATEW''
\microsoft visual studio\vc98\include\winuser.h(41) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(45) : error C2061:
syntax error : identifier ''MENUTEMPLATE''
\microsoft visual studio\vc98\include\winuser.h(45) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(47) : error C2061:
syntax error : identifier ''LPMENUTEMPLATEA''
\microsoft visual studio\vc98\include\winuser.h(47) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(48) : error C2061:
syntax error : identifier ''LPMENUTEMPLATEW''
\microsoft visual studio\vc98\include\winuser.h(48) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(52) : error C2061:
syntax error : identifier ''LPMENUTEMPLATE''
\microsoft visual studio\vc98\include\winuser.h(52) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(55) : error C2143:
syntax error : missing '')'' before ''*''
\microsoft visual studio\vc98\include\winuser.h(55) : error C2143:
syntax error : missing ''{'' before ''*''
\microsoft visual studio\vc98\include\winuser.h(55) : error C2059:
syntax error : '')''
\microsoft visual studio\vc98\include\winuser.h(80) : error C2061:
syntax error : identifier ''DLGPROC''
\microsoft visual studio\vc98\include\winuser.h(80) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(81) : error C2061:
syntax error : identifier ''TIMERPROC''
\microsoft visual studio\vc98\include\winuser.h(81) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(82) : error C2061:
syntax error : identifier ''GRAYSTRINGPROC''
\microsoft visual studio\vc98\include\winuser.h(82) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(83) : error C2061:
syntax error : identifier ''WNDENUMPROC''
\microsoft visual studio\vc98\include\winuser.h(83) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(84) : error C2061:
syntax error : identifier ''HOOKPROC''
\microsoft visual studio\vc98\include\winuser.h(84) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(85) : error C2061:
syntax error : identifier ''SENDASYNCPROC''
\microsoft visual studio\vc98\include\winuser.h(85) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(87) : error C2061:
syntax error : identifier ''EDITWORDBREAKPROCA''
\microsoft visual studio\vc98\include\winuser.h(87) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(88) : error C2061:
syntax error : identifier ''EDITWORDBREAKPROCW''
\microsoft visual studio\vc98\include\winuser.h(88) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(90) : error C2061:
syntax error : identifier ''PROPENUMPROCA''
\microsoft visual studio\vc98\include\winuser.h(90) : error C2059:
syntax error : '';''
\microsoft visual studio\vc98\include\winuser.h(91) : error C2061:
syntax error : identifier ''PROPENUMPROCW''
\microsoft visual studio\vc98\include\winuser.h(91) : error C2059:
syntax error : '';''
Thanks,
Maddy

推荐答案

< ma ****** @ gmail.comwrote in message

新闻:16 ********************************** @ r37g2000 prr.googlegroups.com ...
<ma******@gmail.comwrote in message
news:16**********************************@r37g2000 prr.googlegroups.com...

大家好,


当我包含头文件时,我收到以下错误

winuser.h

我不知道发生了什么事。如何在winuser.h中发生错误?

请帮忙。
Hi All,

I am getting the following errors when i am including header file
winuser.h
I dont know whats happening. How will an error occur in winuser.h??
Please help.



这个偏离主题等等等。

你应该包括windows.h而不是winuser.h


Leo Havm?ller。

This off-topic etc. etc. etc.
You should include windows.h instead of winuser.h

Leo Havm?ller.


ma ****** @ gmail.com 写道:

大家好,


我当我包含头文件时出现以下错误

winuser.h

我不知道发生了什么。如何在winuser.h中发生错误?

请帮助。


\ microsoft visual studio\vc98\include\winuser.h (39):错误C2061:

语法错误:标识符''HDWP''
Hi All,

I am getting the following errors when i am including header file
winuser.h
I dont know whats happening. How will an error occur in winuser.h??
Please help.
\microsoft visual studio\vc98\include\winuser.h(39) : error C2061:
syntax error : identifier ''HDWP''



winuser.h不是C标准头。我会从名称中假设

它是特定于Windows的。因此,如果您将其发布到特定于Windows的新闻组,这是一个可以获得更好答案的问题。


无法访问该头文件,我只能猜到

问题。该错误消息表明HDWP应该被定义为某个地方的
,而且还没有。这些定义通常由#if,#ifdef或#ifndef语句控制。我建议尝试使用

找出HDWP应该定义的位置,然后检查

是否已满足定义它的所有条件。


如果HDWP应该在不同的头文件中定义,那么

winuser.h应该有#included其他文件。但是,对于懒惰的程序员而言,假设其他头文件已经是#b $ b已经被#included,这并不是很好。如果winuser的作者那么懒,那么你的问题可能就是你的代码中的另一个头文件没有#included




您是否有可能使用不同的编译器来编译代码?

winuser.h可能只与Visual Studio兼容。

winuser.h is not a C standard header. I would assume from the name that
it is windows-specific. As such, this is a question that would get
better answers if you posted it to a windows-specific newsgroup.

Being without access to that header file, I can only guess at the
problem. That error message suggests that HDWP is supposed to be defined
somewhere, and hasn''t been. It''s commonplace for such definitions to be
controlled by #if, #ifdef, or #ifndef statements. I''d recommend trying
to find out where HDWP is supposed to be defined, and then check to see
whether all of the conditions for it being defined have been met.

If HDWP is supposed to be defined in a different header file, then
winuser.h should have #included that other file. However, it''s not
uncommon for lazy programmers to assume that the other header file has
already been #included. If the writer of winuser was lazy that way, then
your problem might be that the other header file hasn''t been #included
in your code.

By any chance are you using a different compiler to compile your code?
winuser.h might be compatible only with Visual Studio.


ma******@gmail.com 写道:

大家好,


当我包含头文件时,我收到以下错误

winuser.h

我不知道发生了什么事。如何在winuser.h中发生错误?

请帮忙。
Hi All,

I am getting the following errors when i am including header file
winuser.h
I dont know whats happening. How will an error occur in winuser.h??
Please help.



即使winuser.h不是标准的C头,事实上,它与一个特定的实现相关联,因此, comp.lang.c中的偏离主题,

这可能是你的问题_is_在这里是主题。


每当你看到一系列错误引用在使用你的实现的应用程序中经常使用的标题是

,该标题中的错误几乎肯定是
_not_。最常见的解释是,您在该标头的#include行之前的行上发生了错误。对于

示例,之前在该行上留下分号将意味着该标题的

早期内容被视为该行的延续

线。查看您自己的代码,而不是winuser.h,以查找错误。

Even though winuser.h is not a standard C header and is, in fact, tied
to one specific implementation and, therefore, off-topic in comp.lang.c,
it is likely that your problem _is_ topical here.

Whenever you see a series of errors which refer to a header often used
in applications using your implementation, the error is almost certainly
_not_ in that header. The most common explanation is that you have made
an error on a line preceding the #include line for that header. For
example, leaving off a semicolon on the line before will mean that the
early contents of that header are considered a continuation of that
line. Look at your own code, not at winuser.h, for the error.


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

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