I hate to say this - but these are pretty basic C++ errors that have
nothing whatsoever to do with protocol buffers.  When you ask a question
like, "Am i wrong in linking with the header files?" when "linking" isn't
even a reasonable think to do with header files, you show that you don't
know the language properly.

First, you aren't even giving us your source code, so we just have to guess
- but more importantly, this isn't a C++ tutorial list, and using the
protocol buffer bug database when there's no actual bug in sight is simply
a waste of resources.



On Fri, Dec 23, 2011 at 3:52 AM, <proto...@googlecode.com> wrote:

>
> 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<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+unsubscribe@**
> googlegroups.com <protobuf%2bunsubscr...@googlegroups.com>.
> For more options, visit this group at http://groups.google.com/**
> group/protobuf?hl=en <http://groups.google.com/group/protobuf?hl=en>.
>
>


-- 
     /t

http://radio.swirly.com - art music radio 24/7 366/1000

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