You can't "using" a namespace that doesn't exist. This is a standard C++
issue. There's no way the namespace "google::protobuf" could have been
defined before you included even a single header file!
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
This is also a standard C++ semantic issue. The statement "using namespace
Foo::Bar" causes everything inside the namespace "Foo::Bar" to be visible
without qualification. It does *not* make "Bar" itself visible without
qualificiation. If you want to keep "protobuf::", you need "using namespace
google", not "using namespace google::protobuf". Otherwise keep "using
namespace google::protobuf" and refer to "RpcChannel",
not "protobuf::RpcChannel" (and so on).
See
<http://code.google.com/apis/protocolbuffers/docs/reference/cpp-generated.html#service>.
By default implementations of RPC services are not generated because the
implementations should be tied to the specific RPC protocol in use, which
protobuf does not know.
Hi,
Thanks a lot for your help. I was trying out a very simple example in which
I am trying to set and retrieve a variable in a message.
I get the following error.
$ g++ simpleprog.cpp
/tmp/cc7ulNxs.o: In function `main':
simpleprog.cpp:(.text+0x1d): undefined reference to `num::num()'
collect2: ld returned 1 exit status
I am attaching my files.
Maybe something is wrong with my c++ coding. I apologize for these
clarifications that might seem basic. Can you please help me out.
Attachments:
simpleprog.proto 44 bytes
simpleprog.pb.h 4.3 KB
simpleprog.pb.cc.txt 8.6 KB
simpleprog.cpp 223 bytes
Again, these are completely basic C++ errors that have nothing to do with
protocol buffers at all.
Reporting these as a bug is abusing the bug system!
(In this case, your issue is that you aren't compiling and linking the code
in simpleprog.pb.cc so when it links it doesn't find the code for the class
num.)
Please find some C++ mailing list or board to ask these questions. Thank
you.
thank you.. sorry for raising these issues here.