Compile error : Type name expected in typedef declaration on aCC HPUX11.0

Discussion in 'C++' started by wong_powah@yahoo.ca, Feb 1, 2008.

  1. Guest

    How to fix the compile errors?
    I do not see any error in the typedef.
    # make clean; make depend; make lib
    aCC -D_RWSTD_MULTI_THREAD -mt +W829 +W254 +W667 +W749 +Z +p -c -AA -AP
    +DD64 -I../util_vob/Include -I../open_ssl_vob/openssl/include -DUNIX -
    DHPUX -DHPUX_11_00 -DCA_INCLUDED -DOS_UNIX -DOS_HPUX -DOS_HPUX_11_00 -
    DBIG_ENDIAN -DUSE_PTHREADS -D_REENTRANT -D_THREAD_SAFE -DCA_INCLUDED
    -
    DLP64_CORRECT Util/BaseCommandQueueClass.cpp -o hpux/
    BaseCommandQueueClass.o
    Error 667: "Util/TokenCommandClass.h", line 32 # Type name expected in
    typedef declaration.
    typedef enum CmdObjTyp { CmdObjTyp_TokenCommand, CmdObjTyp_Serve
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error 667: "Util/TokenCommandClass.h", line 33 # Type name expected in
    typedef declaration.
    typedef enum UtilTyp { UtilTyp_Command, UtilTyp_Response }
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    make[3]: *** [hux/BaseCommandQueueClass.o] Error 2

    # aCC --version
    aCC: HP ANSI C++ B3910B A.03.33

    # uname -a
    HP-UX hp1 B.11.00 U 9000/785 2003725330 unlimited-user license
    , Feb 1, 2008
    #1
    1. Advertising

  2. Guest

    Re: Compile error : Type name expected in typedef declaration on aCCHPUX 11.0

    On Feb 1, 9:35 am, wrote:
    > How to fix the compile errors?
    > I do not see any error in the typedef.
    > # make clean; make depend; make lib
    > aCC -D_RWSTD_MULTI_THREAD -mt +W829 +W254 +W667 +W749 +Z +p -c -AA -AP
    > +DD64 -I../util_vob/Include -I../open_ssl_vob/openssl/include -DUNIX -
    > DHPUX -DHPUX_11_00 -DCA_INCLUDED -DOS_UNIX -DOS_HPUX -DOS_HPUX_11_00 -
    > DBIG_ENDIAN -DUSE_PTHREADS -D_REENTRANT -D_THREAD_SAFE  -DCA_INCLUDED
    > -
    > DLP64_CORRECT   Util/BaseCommandQueueClass.cpp -o hpux/
    > BaseCommandQueueClass.o
    > Error 667: "Util/TokenCommandClass.h", line 32 # Type name expected in
    > typedef declaration.
    >     typedef enum CmdObjTyp { CmdObjTyp_TokenCommand, CmdObjTyp_Serve
    >     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    > Error 667: "Util/TokenCommandClass.h", line 33 # Type name expected in
    > typedef declaration.
    >     typedef enum UtilTyp { UtilTyp_Command, UtilTyp_Response }
    >     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    > make[3]: *** [hux/BaseCommandQueueClass.o] Error 2
    >
    > # aCC --version
    > aCC: HP ANSI C++ B3910B A.03.33
    >
    > # uname -a
    > HP-UX hp1 B.11.00 U 9000/785 2003725330 unlimited-user license


    presumably you want, for example, "UtilTyp" to be
    typedef'd as an "enum {UtilTyp_command, UtilTyp_Response}"

    Use:
    typedef enum {....} UtilTyp;

    Then you can later use
    UtilTyp myVariable;
    --
    Fred Kleinschmidt
    , Feb 1, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. M. Faust
    Replies:
    0
    Views:
    389
    M. Faust
    Oct 18, 2004
  2. Shane
    Replies:
    0
    Views:
    365
    Shane
    Oct 14, 2007
  3. Jeff
    Replies:
    3
    Views:
    509
  4. Luca Forlizzi
    Replies:
    4
    Views:
    448
    Luca Forlizzi
    Nov 14, 2010
  5. eric
    Replies:
    2
    Views:
    817
Loading...

Share This Page