简体   繁体   English

使用NDK将C ++应用程序移植到Android

[英]Porting C++ application to Android using NDK

I want to port an C++ application to Android using the NDK. 我想使用NDK将C ++应用程序移植到Android。 The application is to be used in both Win-PCs and tablets (Project Tango). 该应用程序将在Win-PC和平板电脑(Project Tango)中使用。 Its function is to support a custom API that I am testing. 它的功能是支持我正在测试的自定义API。 The applications are for research purposes only, so I am not worried about deployment other than on said tablets. 这些应用程序仅用于研究目的,因此我不担心除了上述平板电脑以外的其他部署。

I know that the NDK support of C++ libs has evolved substantially since this question: Porting a C++ application to android 我知道自这个问题以来,对C ++库的NDK支持已经有了很大的发展: 将C ++应用程序移植到android

The application I am porting depends on the following headers: STL containers, pthreads32, jsoncpp, winsocks. 我要移植的应用程序取决于以下标头:STL容器,pthreads32,jsoncpp,winsocks。

I know winsocks will have to be rewritten to BSD sockets, what about STLs and pthreads? 我知道Winsocks必须重写为BSD套接字,STL和pthreads又如何呢? Will jsoncpp work if I have the complete library? 如果我具有完整的库,jsoncpp是否可以工作?

Also, what is the process for including other libraries? 另外,包括其他库的过程是什么? Do I just include the .so file? 我是否仅包括.so文件? Apologies, I am very new to the NDK. 抱歉,我对NDK非常陌生。

STL support is documented here: https://developer.android.com/ndk/guides/cpp-support.html STL支持在此处记录: https : //developer.android.com/ndk/guides/cpp-support.html

Can include prebuilt libraries into your app with https://developer.android.com/ndk/guides/prebuilts.html 可以使用https://developer.android.com/ndk/guides/prebuilts.html将预构建的库包含到您的应用程序中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM