[英]can i use protobuf-c both in C++ and C?
i'm new one to protobuf-c i have altered protobuf-c client and server example program as per my requirement and i got this program through this link 我是protobuf-c的新手,我已根据我的要求更改了protobuf-c客户端和服务器示例程序,并通过此链接获得了此程序
code.google.com/p/protobuf-c/wiki/RPC_Example
code.google.com/p/protobuf-c/wiki/RPC_Example
now i have to write server side programing in c++ and i want to use the client side program in c itself this my new requirement 现在我必须用C ++编写服务器端编程,并且我想在C本身中使用客户端程序,这是我的新要求
can any one please help me how to use the .h and .c proto file that is compiled using protobuf-c in c++ server side program file 谁能帮我如何使用在C ++服务器端程序文件中使用protobuf-c编译的.h和.c proto文件
any suggestions will be appreciated 任何建议将不胜感激
As pointed by @Konrad Rudolph, the entire point of protobuf is to use same message format with different languages. 正如@Konrad Rudolph所指出的,protobuf的全部目的是使用具有不同语言的相同消息格式。 So, you do the following:
因此,您执行以下操作:
This will resolve your issue. 这样可以解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.