我有一个mytest.proto文件的mytest.cc和mytest.h输出,但我找不到任何关于如何使用g ++编译对象的参考。 (.proto很好,因为我使用Python)

g ++ mytest.cc -l ???????

要包含哪些库?

有帮助吗?

解决方案

我认为您可能需要链接到libprotobuf

g++ mytest.cc -lprotobuf -o mytest
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top