为Android编译C ++ gRPC [英] Compiling C++ gRPC for Android
问题描述
如何为Android编译C ++ gRPC代码?我看过一些有关如何使用Android Native Development Kit编译Protobuf本身的教程,例如
How to compile C++ gRPC code for Android? I have seen several tutorials on how Protobuf itself can be compiled using the Android Native Development Kit, such as in the answer from Swapnil: How to integrate/install latest c++ protobuf (3.2) with Android NDK?
但是如何在Android平台上也如何编译使用Protobuf的C ++ gRPC代码?考虑到 gRPC Makefile 有2万行.
But how to How to compile C++ gRPC code that is using Protobuf as well for Android? Taking into account that there's 20K lines of gRPC Makefile.
推荐答案
我已经完成了此处.
简而言之:git子模块gRPC C ++,添加"CMakeLists.txt";文件添加到您的项目中,了解如何构建C ++ gRPC(以及使用它的代码),然后将 externalNativeBuild/cmake
添加到您的"build.gradle"文件中.-瞧!
In brief: git submodule gRPC C++, add "CMakeLists.txt" file to your project on how to build C++ gRPC (and your code that uses it), add a externalNativeBuild/cmake
it to your "build.gradle" - voila!
这篇关于为Android编译C ++ gRPC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!