Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Protocol buffers Can';t在Linux x64版本配置上使用gRPC构建项目_Protocol Buffers_Grpc_C Ares - Fatal编程技术网

Protocol buffers Can';t在Linux x64版本配置上使用gRPC构建项目

Protocol buffers Can';t在Linux x64版本配置上使用gRPC构建项目,protocol-buffers,grpc,c-ares,Protocol Buffers,Grpc,C Ares,我有一个使用gRPC的项目。它成功地构建在Windows上的任何配置(Debug\Release)和Linux上的调试配置上。 但在释放模式下,我有下一个错误: ld: cannot find -lnsl 在CMake输出(link.txt)中: 那奇怪的额外依赖是什么?以及如何解决它?要解决它,应该使用CONAN_PKG::grpc。从这里开始: #debug build ... /home/user/data/c-ares/1.15.0/debug/lib/libcares.a /hom

我有一个使用gRPC的项目。它成功地构建在Windows上的任何配置(Debug\Release)和Linux上的调试配置上。 但在释放模式下,我有下一个错误:

ld: cannot find -lnsl
在CMake输出(link.txt)中:


那奇怪的额外依赖是什么?以及如何解决它?

要解决它,应该使用
CONAN_PKG::grpc
。从这里开始:

#debug build
...
 /home/user/data/c-ares/1.15.0/debug/lib/libcares.a /home/user/data/grpc/1.23.0/debug/lib/libaddress_sorting.a
...
#release build
...
 /home/user/data/c-ares/1.15.0/release/lib/libcares.a -lnsl /home/user/data/grpc/1.23.0/release/lib/libaddress_sorting.a
...