error C2061

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • madhu.ab@gmail.com

    error C2061

    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\inc lude\winuser.h( 39) : error C2061:
    syntax error : identifier 'HDWP'
    \microsoft visual studio\vc98\inc lude\winuser.h( 39) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 40) : error C2061:
    syntax error : identifier 'MENUTEMPLATEA'
    \microsoft visual studio\vc98\inc lude\winuser.h( 40) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 41) : error C2061:
    syntax error : identifier 'MENUTEMPLATEW'
    \microsoft visual studio\vc98\inc lude\winuser.h( 41) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 45) : error C2061:
    syntax error : identifier 'MENUTEMPLATE'
    \microsoft visual studio\vc98\inc lude\winuser.h( 45) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 47) : error C2061:
    syntax error : identifier 'LPMENUTEMPLATE A'
    \microsoft visual studio\vc98\inc lude\winuser.h( 47) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 48) : error C2061:
    syntax error : identifier 'LPMENUTEMPLATE W'
    \microsoft visual studio\vc98\inc lude\winuser.h( 48) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 52) : error C2061:
    syntax error : identifier 'LPMENUTEMPLATE '
    \microsoft visual studio\vc98\inc lude\winuser.h( 52) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 55) : error C2143:
    syntax error : missing ')' before '*'
    \microsoft visual studio\vc98\inc lude\winuser.h( 55) : error C2143:
    syntax error : missing '{' before '*'
    \microsoft visual studio\vc98\inc lude\winuser.h( 55) : error C2059:
    syntax error : ')'
    \microsoft visual studio\vc98\inc lude\winuser.h( 80) : error C2061:
    syntax error : identifier 'DLGPROC'
    \microsoft visual studio\vc98\inc lude\winuser.h( 80) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 81) : error C2061:
    syntax error : identifier 'TIMERPROC'
    \microsoft visual studio\vc98\inc lude\winuser.h( 81) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 82) : error C2061:
    syntax error : identifier 'GRAYSTRINGPROC '
    \microsoft visual studio\vc98\inc lude\winuser.h( 82) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 83) : error C2061:
    syntax error : identifier 'WNDENUMPROC'
    \microsoft visual studio\vc98\inc lude\winuser.h( 83) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 84) : error C2061:
    syntax error : identifier 'HOOKPROC'
    \microsoft visual studio\vc98\inc lude\winuser.h( 84) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 85) : error C2061:
    syntax error : identifier 'SENDASYNCPROC'
    \microsoft visual studio\vc98\inc lude\winuser.h( 85) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 87) : error C2061:
    syntax error : identifier 'EDITWORDBREAKP ROCA'
    \microsoft visual studio\vc98\inc lude\winuser.h( 87) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 88) : error C2061:
    syntax error : identifier 'EDITWORDBREAKP ROCW'
    \microsoft visual studio\vc98\inc lude\winuser.h( 88) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 90) : error C2061:
    syntax error : identifier 'PROPENUMPROCA'
    \microsoft visual studio\vc98\inc lude\winuser.h( 90) : error C2059:
    syntax error : ';'
    \microsoft visual studio\vc98\inc lude\winuser.h( 91) : error C2061:
    syntax error : identifier 'PROPENUMPROCW'
    \microsoft visual studio\vc98\inc lude\winuser.h( 91) : error C2059:
    syntax error : ';'


    Thanks,
    Maddy
  • =?iso-8859-1?Q?Leo_Havm=F8ller?=

    #2
    Re: error C2061

    <madhu.ab@gmail .comwrote in message
    news:163454e4-759f-4164-b951-ce6298c114e8@r3 7g2000prr.googl egroups.com...
    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.
    This off-topic etc. etc. etc.
    You should include windows.h instead of winuser.h

    Leo Havmøller.

    Comment

    • James Kuyper

      #3
      Re: error C2061

      madhu.ab@gmail. com wrote:
      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\inc lude\winuser.h( 39) : error C2061:
      syntax error : identifier 'HDWP'
      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.

      Comment

      • Martin Ambuhl

        #4
        Re: error C2061

        madhu.ab@gmail. com wrote:
        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.
        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.

        Comment

        • jacob navia

          #5
          Re: error C2061

          madhu.ab@gmail. com wrote:
          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.

          Do not include directly winuser.h

          Just include windows.h and be done with it

          --
          jacob navia
          jacob at jacob point remcomp point fr
          logiciels/informatique

          Comment

          • Gordon Burditt

            #6
            Re: error C2061

            >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??
            If you get a cascade of syntax errors from a header file, especially
            one distributed with a system or software package that should be
            well-debugged, it is often because you have failed to include a
            prerequesite header file (*first*) that defines typedefs needed by
            that header file. The errors will usually be at the point where
            the typedef is used.
            >Please help.
            >
            >
            >\microsoft visual studio\vc98\inc lude\winuser.h( 39) : error C2061:
            >syntax error : identifier 'HDWP'
            >\microsoft visual studio\vc98\inc lude\winuser.h( 39) : error C2059:
            >syntax error : ';'
            >\microsoft visual studio\vc98\inc lude\winuser.h( 40) : error C2061:
            >syntax error : identifier 'MENUTEMPLATEA'
            ....

            Comment

            • CBFalconer

              #7
              Re: error C2061

              madhu.ab@gmail. com wrote:
              >
              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\inc lude\winuser.h( 39) : error C2061:
              syntax error : identifier 'HDWP'
              That looks suspiciously like a windows header. It certainly isn't
              mentioned in the C standard, which makes it off-topic on c.l.c.
              Try a group that deals with Microsoft or Windows.

              --
              [mail]: Chuck F (cbfalconer at maineline dot net)
              [page]: <http://cbfalconer.home .att.net>
              Try the download section.

              Comment

              • Martin Ambuhl

                #8
                Re: error C2061

                CBFalconer wrote:
                madhu.ab@gmail. com wrote:
                >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\inc lude\winuser.h( 39) : error C2061:
                >syntax error : identifier 'HDWP'
                >
                That looks suspiciously like a windows header. It certainly isn't
                mentioned in the C standard, which makes it off-topic on c.l.c.
                Try a group that deals with Microsoft or Windows.
                Cascading errors on the inclusion of a commonly used header are commonly
                seen, and have nothing to do with Microsoft or Windows. He might have
                reported similar behavior when including a standard header. You are too
                quick to jump on the off-topic wagon.

                Comment

                • Nick Keighley

                  #9
                  Re: error C2061

                  On 18 Nov, 00:45, Martin Ambuhl <mamb...@earthl ink.netwrote:
                  CBFalconer wrote:
                  madhu...@gmail. com wrote:
                  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\inc lude\winuser.h( 39) : error C2061:
                  syntax error : identifier 'HDWP'
                  >
                  That looks suspiciously like a windows header. It certainly isn't
                  mentioned in the C standard, which makes it off-topic on c.l.c.
                  Try a group that deals with Microsoft or Windows.
                  >
                  Cascading errors on the inclusion of a commonly used header are commonly
                  seen, and have nothing to do with Microsoft or Windows. He might have
                  reported similar behavior when including a standard header.
                  why?
                  You are too
                  quick to jump on the off-topic wagon.
                  yes

                  --
                  Nick Keighley

                  Comment

                  • Chris Dollin

                    #10
                    Re: error C2061

                    Nick Keighley wrote:
                    On 18 Nov, 00:45, Martin Ambuhl <mamb...@earthl ink.netwrote:
                    >Cascading errors on the inclusion of a commonly used header are commonly
                    >seen, and have nothing to do with Microsoft or Windows. He might have
                    >reported similar behavior when including a standard header.
                    >
                    why?
                    Consider:

                    struct wallace
                    {
                    int grommit;
                    }

                    #include <stdio.h>

                    When I compile this I get:

                    In file included from /usr/include/stdio.h:34,
                    from x.c:6:
                    /usr/lib/gcc/i386-redhat-linux/4.3.0/include/stddef.h:214: error: two or more
                    data types in declaration specifiers
                    /usr/lib/gcc/i386-redhat-linux/4.3.0/include/stddef.h:214: error: two or more
                    data types in declaration specifiers

                    That this is caused by the little man that isn't there, isn't obvious.

                    --
                    "We are on the brink of a new era, if only --" /The Beiderbeck Affair/

                    Hewlett-Packard Limited Cain Road, Bracknell, registered no:
                    registered office: Berks RG12 1HN 690597 England

                    Comment

                    • maddy

                      #11
                      Re: error C2061

                      On Nov 17, 4:43 pm, Leo Havmøller <rtx...@nospam. nospamwrote:
                      <madhu...@gmail .comwrote in message
                      >
                      news:163454e4-759f-4164-b951-ce6298c114e8@r3 7g2000prr.googl egroups.com...
                      >
                      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.
                      >
                      This off-topic etc. etc. etc.
                      You should include windows.h instead of winuser.h
                      >
                      Leo Havmøller.
                      HI Leo,

                      Thanks. I used windows.h and it is working fine now.

                      Comment

                      • maddy

                        #12
                        Re: error C2061

                        On Nov 17, 10:58 pm, gordonb.l2...@b urditt.org (Gordon Burditt) wrote:
                        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??
                        >
                        If you get a cascade of syntax errors from a header file, especially
                        one distributed with a system or software package that should be
                        well-debugged, it is often because you have failed to include a
                        prerequesite header file (*first*) that defines typedefs needed by
                        that header file.  The errors will usually be at the point where
                        the typedef is used.
                        >
                        Please help.
                        >
                        \microsoft visual studio\vc98\inc lude\winuser.h( 39) : error C2061:
                        syntax error : identifier 'HDWP'
                        \microsoft visual studio\vc98\inc lude\winuser.h( 39) : error C2059:
                        syntax error : ';'
                        \microsoft visual studio\vc98\inc lude\winuser.h( 40) : error C2061:
                        syntax error : identifier 'MENUTEMPLATEA'
                        >
                        ...
                        Thanks friends. "windows.h " is working fine.
                        Thanks for the helping and sharing :)

                        Thanks
                        Maddy

                        Comment

                        • CBFalconer

                          #13
                          Re: error C2061

                          Martin Ambuhl wrote:
                          CBFalconer wrote:
                          >madhu.ab@gmail. com wrote:
                          >>
                          >>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\inc lude\winuser.h( 39) : error C2061:
                          >>syntax error : identifier 'HDWP'
                          >>
                          >That looks suspiciously like a windows header. It certainly
                          >isn't mentioned in the C standard, which makes it off-topic on
                          >c.l.c. Try a group that deals with Microsoft or Windows.
                          >
                          Cascading errors on the inclusion of a commonly used header are
                          commonly seen, and have nothing to do with Microsoft or Windows.
                          He might have reported similar behavior when including a standard
                          header. You are too quick to jump on the off-topic wagon.
                          Are you claiming that winuser.h is mentioned in the C standard, or
                          that the experts on Windows C programming hang out here? If madhu
                          asks in the appropriate newsgroup he will get answers that have
                          been examined and criticized by multiple experts on the subject.

                          --
                          [mail]: Chuck F (cbfalconer at maineline dot net)
                          [page]: <http://cbfalconer.home .att.net>
                          Try the download section.

                          Comment

                          • James Kuyper

                            #14
                            Re: error C2061

                            Martin Ambuhl wrote:
                            CBFalconer wrote:
                            >madhu.ab@gmail. com wrote:
                            >>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\inc lude\winuser.h( 39) : error C2061:
                            >>syntax error : identifier 'HDWP'
                            >>
                            >That looks suspiciously like a windows header. It certainly isn't
                            >mentioned in the C standard, which makes it off-topic on c.l.c. Try a
                            >group that deals with Microsoft or Windows.
                            >
                            Cascading errors on the inclusion of a commonly used header are commonly
                            seen, and have nothing to do with Microsoft or Windows. He might have
                            reported similar behavior when including a standard header. You are too
                            quick to jump on the off-topic wagon.
                            Well, that doesn't seem to have been the case here. The OP reports that
                            replacing winuser.h with windows.h has solved the problem. I don't know
                            why that makes a difference; but it implies that it has nothing to do
                            with anything in the user code (like a missing ';') preceding the
                            #include statement. It seems to me that no one could answer his question
                            without being aware of the existence of windows.h and the nature of the
                            differences between windows.h and winuser.h. That in turn implies that
                            he would have received a useful response far more quickly on a windows
                            newsgroup than he did on this one.

                            Comment

                            • Martin Ambuhl

                              #15
                              Re: error C2061

                              CBFalconer wrote:
                              Martin Ambuhl wrote:
                              >CBFalconer wrote:
                              >>madhu.ab@gmail. com wrote:
                              >>>
                              >>>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\inc lude\winuser.h( 39) : error C2061:
                              >>>syntax error : identifier 'HDWP'
                              >>That looks suspiciously like a windows header. It certainly
                              >>isn't mentioned in the C standard, which makes it off-topic on
                              >>c.l.c. Try a group that deals with Microsoft or Windows.
                              >Cascading errors on the inclusion of a commonly used header are
                              >commonly seen, and have nothing to do with Microsoft or Windows.
                              >He might have reported similar behavior when including a standard
                              >header. You are too quick to jump on the off-topic wagon.
                              >
                              Are you claiming that winuser.h is mentioned in the C standard, or
                              that the experts on Windows C programming hang out here? If madhu
                              asks in the appropriate newsgroup he will get answers that have
                              been examined and criticized by multiple experts on the subject.
                              Don't be daft. I never in any post suggested that winuser.h was
                              mentioned in the C standard, or that experts in Windows C programming
                              hang out here. The kind of pronlem he reported is independent of any
                              particular header, any particular implementation, or where any kind of
                              expert other than in C programming hangs out. It is a common problem
                              for inexpert C programmers, no matter what headers or what
                              implementation they might use. Your seeing "winuser.h" and hitting the
                              off-topic button is silly and is based on not looking at the actually
                              reported problem.

                              Comment

                              Working...