C++ Protobuf helloworld编译错误
我检查了protobuf存储库,它是用自定义前缀构建并安装的,然后从Google复制并粘贴了Person示例,并使用C++ Protobuf helloworld编译错误,c++,g++,protocol-buffers,C++,G++,Protocol Buffers,我检查了protobuf存储库,它是用自定义前缀构建并安装的,然后从Google复制并粘贴了Person示例,并使用protoc编译。没关系 但当我在CPP文件中包含Person.pb.h时,我得到: /home/name/usr/include/google/protobuf/repeated_field.h:53:47: fatal error: google/protobuf/stubs/type_traits.h: No such file or directory 该文件未安装。这是
protoc
编译。没关系
但当我在CPP文件中包含Person.pb.h
时,我得到:
/home/name/usr/include/google/protobuf/repeated_field.h:53:47: fatal error:
google/protobuf/stubs/type_traits.h: No such file or directory
该文件未安装。这是一个bug吗?从Ubuntu存储库安装很好。这是否意味着你的问题现在得到了回答?@MrLister没有回答,但通过从存储库安装解决了问题。