【发布时间】:2019-02-27 10:24:51
【问题描述】:
我正在尝试编译grpc_python_plugin。我在 Github 上下载了最新的 grpc 包。按照提示进入grpc目录,开始编译
make grpc_python_plugin
,并得到以下错误:
wcf@wcf-OptiPlex-7060:~/resq/grpc$ make grpc_python_plugin
[C] Compiling third_party/address_sorting/address_sorting.c
cc1: error: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C [-Werror]
cc1: all warnings being treated as errors
Makefile:2972: recipe for target '/home/wcf/resq/grpc/objs/opt/third_party/address_sorting/address_sorting.o' failed
make: *** [/home/wcf/resq/grpc/objs/opt/third_party/address_sorting/address_sorting.o] Error 1
由于grpc 的Makefile 如此庞大,我找不到任何解决问题的方法。你能就我的问题分享一些想法吗?感谢您的时间。
【问题讨论】:
-
您的 makefile 似乎在调用 C 编译器而不是 C++ 编译器。或者你可能需要
-std=c11而不是c++11 -
你可以看看
grpc的Makefile,它有20000多行。目前还不清楚会发生什么。
标签: c++11 compiler-errors grpc