SOLVED
there was conflict between my enum value names with enums defined
Apache http header files.
So I added a suffix to my enum value names.

On May 13, 2:20 pm, Sky <hmonfa...@gmail.com> wrote:
> Hi,
> I have two projects in Eclipe:
> 1- *.proto and protoc generated files to be used in other projects as
> common library ( shared library 1 )
> 2- a Simple shared library which uses "shared library 1" ( shared
> library 2)
> when I compile shared library 1 alone, I compiles successfully
> but when I compile shared library 2 I get strange error which I can't
> find out where is the problem.
> I used libprotobuf in linkning and included protobuf include
> directories in gcc
> here is my error :
> ----------------------
> /root/workspace/IPWEC/commondef.pb.h:39:3: error: expected identifier
> before numeric constant
> /root/workspace/IPWEC/commondef.pb.h:39:3: error: expected ‘}’ before
> numeric constant
> /root/workspace/IPWEC/commondef.pb.h:39:3: error: expected unqualified-
> id before numeric constant
> /root/workspace/IPWEC/commondef.pb.h:86:7: error: ‘StatusCodes’ does
> not name a type
> /root/workspace/IPWEC/commondef.pb.h:87:7: error: ‘StatusCodes’ does
> not name a type
> /root/workspace/IPWEC/commondef.pb.h:88:35: error: ‘StatusCodes_MAX’
> was not declared in this scope
> /root/workspace/IPWEC/commondef.pb.h:91:46: error: ‘StatusCodes_Name’
> declared as an ‘inline’ variable
> /root/workspace/IPWEC/commondef.pb.h:91:46: error: ‘StatusCodes’ was
> not declared in this scope
> /root/workspace/IPWEC/commondef.pb.h:91:46: note: suggested
> alternative:
> /root/workspace/IPWEC/commondef.pb.h:36:6: note:
> ‘IPWEC::StatusCodes’
> /root/workspace/IPWEC/commondef.pb.h:91:65: error: expected ‘,’ or ‘;’
> before ‘{’ token
> /root/workspace/IPWEC/commondef.pb.h:96:32: error: ‘StatusCodes’ has
> not been declared
> /root/workspace/IPWEC/commondef.pb.h: In function ‘bool
> StatusCodes_Parse(const string&, int*)’:
> /root/workspace/IPWEC/commondef.pb.h:97:55: error: ‘StatusCodes’ was
> not declared in this scope
> /root/workspace/IPWEC/commondef.pb.h:97:55: note: suggested
> alternative:
> /root/workspace/IPWEC/commondef.pb.h:36:6: note:
> ‘IPWEC::StatusCodes’
> /root/workspace/IPWEC/commondef.pb.h:98:42: error: no matching
> function for call to ‘ParseNamedEnum(const
> google::protobuf::EnumDescriptor*, const string&, int*&)’
> /root/workspace/IPWEC/commondef.pb.h:98:42: note: candidate is:
> /usr/local/include/google/protobuf/generated_message_reflection.h:
> 406:6: note: template<class EnumType> bool
> google::protobuf::internal::ParseNamedEnum(const
> google::protobuf::EnumDescriptor*, const string&, EnumType*)
> /root/workspace/IPWEC/commondef.pb.h: At global scope:
> /root/workspace/IPWEC/commondef.pb.h:101:3: error: expected identifier
> before numeric constant
> /root/workspace/IPWEC/commondef.pb.h:101:3: error: expected ‘}’ before
> numeric constant
> /root/workspace/IPWEC/commondef.pb.h:101:3: error: expected
> unqualified-id before numeric constant
> /root/workspace/IPWEC/commondef.pb.h:128:1: error: expected
> declaration before ‘}’ token
> make: *** [IPWIFilter.o] Error 1
> ------------------
> Am I missing something ?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to