Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Compile error : Type name expected in typedef declaration on aCC HPUX11.0

Reply
Thread Tools

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

 
 
wong_powah@yahoo.ca
Guest
Posts: n/a
 
      02-01-2008
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
 
Reply With Quote
 
 
 
 
fred.l.kleinschmidt@boeing.com
Guest
Posts: n/a
 
      02-01-2008
On Feb 1, 9:35*am, (E-Mail Removed) 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what may cause compile error (expected nested-name-specifier before 'Policy-T')? eric C++ 2 07-12-2011 02:14 AM
type declaration in declaration of a parameter or return type of a function Luca Forlizzi C Programming 4 11-14-2010 09:30 PM
error: expected `;' before 'itr' template compile error? Solaris vsLinux Jeff C++ 3 03-11-2008 08:29 PM
aCC : error 2265 - type is inaccessible Shane C++ 0 10-14-2007 10:09 PM
typedef type name; error with swig wrapper and VC++ 6 M. Faust Python 0 10-18-2004 05:40 PM



Advertisments