【发布时间】:2020-09-18 11:59:22
【问题描述】:
当我试图在 Ubuntu 20 上运行 make 命令来构建 protobuf 时,我遇到了这个错误
google/protobuf/compiler/command_line_interface.cc:913:55: error: cannot bind rvalue reference of type ‘std::__cxx11::basic_string<char>&&’ to lvalue of type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
913 | proto_path_.push_back(make_pair<string, string>(virtual_path, disk_path));
| ^~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/string:40,
from ./google/protobuf/stubs/common.h:41,
from ./google/protobuf/compiler/command_line_interface.h:41,
from google/protobuf/compiler/command_line_interface.cc:35:
有人知道怎么解决吗?
【问题讨论】:
-
你最后做了什么?
-
@RafaelChaves 我使用了一个停靠图像来构建它
标签: c++ ubuntu protocol-buffers proto