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

W

wong_powah

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
 
F

fred.l.kleinschmidt

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;
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top