How to Port a C++ Project into Android NDK?

  • Context: C/C++ 
  • Thread starter Thread starter knowLittle
  • Start date Start date
  • Tags Tags
    Android C++ Project
Click For Summary
SUMMARY

This discussion focuses on the challenges of porting a C++ project into the Android Native Development Kit (NDK), specifically when using libraries such as NTL, GMP, and OpenSSL. The user has successfully compiled these libraries but seeks guidance on effectively integrating them into a larger C++ codebase through Java Native Interface (JNI). The concern is raised about the practicality of wrapping each function individually, given the complexity and size of the project.

PREREQUISITES
  • Familiarity with C++ programming language
  • Understanding of Android NDK and its build system
  • Knowledge of Java Native Interface (JNI) for C++ integration
  • Experience with libraries like NTL, GMP, and OpenSSL
NEXT STEPS
  • Research best practices for JNI integration in large C++ projects
  • Explore automated tools for wrapping C++ functions for JNI
  • Learn about Android NDK build configurations and CMake
  • Investigate strategies for managing dependencies in Android NDK projects
USEFUL FOR

Android developers, C++ programmers transitioning to mobile development, and software engineers working with native libraries in Android applications.

knowLittle
Messages
307
Reaction score
3
Hello All,

I know that this post is very old, but I have a similar question. I believe that it is very relevant and there should be copious material on the net, but I have been unable to find it.

I am trying to port a C++ project into Android. My project uses NTL, GMP, and OpenSSL. I am able to compile this libraries using instructions on the net, but I wonder how to go about calling the code in the project.
I have seen examples that individually call a function from a library in C++. So, this function would be wrapped in JAVA JNI form.
I highly doubt that this is the way to go in porting a huge project with many lines of code in many different files and different function calls.

Any one can help?
Thank you.
 
Technology news on Phys.org
This is a very good question and deserves to see some input, but unfortunately I don't have any good input, for I am having the same problem.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 19 ·
Replies
19
Views
6K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
6
Views
3K