Comment #2 on issue 357 by cauverys...@gmail.com: error messages while compiling a c++ program that uses .proto file.
http://code.google.com/p/protobuf/issues/detail?id=357

hi,
thanks for your reply.
Now i have used the namespace after .pb.h:
#include "search.pb.h"
using  namespace google::protobuf

I get the errors:
~/Desktop/proto/search$ g++ searchinc.cpp
searchinc.cpp:8:1: error: ‘protobuf’ does not name a type
searchinc.cpp:9:1: error: ‘protobuf’ does not name a type
searchinc.cpp:10:1: error: ‘SearchService’ does not name a type
searchinc.cpp: In function ‘void DoSearch()’:
searchinc.cpp:17:3: error: ‘channel’ was not declared in this scope
searchinc.cpp:17:17: error: expected type-specifier before ‘MyRpcChannel’
searchinc.cpp:17:17: error: expected ‘;’ before ‘MyRpcChannel’
searchinc.cpp:18:3: error: ‘controller’ was not declared in this scope
searchinc.cpp:18:20: error: expected type-specifier before ‘MyRpcController’
searchinc.cpp:18:20: error: expected ‘;’ before ‘MyRpcController’
searchinc.cpp:22:3: error: ‘service’ was not declared in this scope
searchinc.cpp:22:17: error: expected type-specifier before ‘SearchService’
searchinc.cpp:22:17: error: expected ‘;’ before ‘SearchService’
searchinc.cpp:28:50: error: ‘protobuf’ has not been declared
searchinc.cpp:28:73: error: ‘Done’ was not declared in this scope
searchinc.cpp: In function ‘void Done()’:
searchinc.cpp:32:10: error: ‘service’ was not declared in this scope
searchinc.cpp:33:10: error: ‘channel’ was not declared in this scope
searchinc.cpp:34:10: error: ‘controller’ was not declared in this scope

Am i wrong in linking with the header files?


--
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