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

AI Thread Summary
Porting a C++ project to Android poses challenges, particularly when integrating libraries like NTL, GMP, and OpenSSL. While compiling these libraries is manageable with available online resources, the main concern is effectively calling the C++ code within the Android environment. The common approach involves wrapping individual C++ functions in Java using JNI, but this method may not be practical for large projects with extensive codebases and multiple function calls. The discussion highlights the need for more comprehensive guidance on handling such complex integrations in Android development.
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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top