1

I have installed the SDK,NDK,JDK and Cygwin. I want to know if I will need to edit the code of libraries to make them compile for Android(armv7).

I basically need to port a variety of C applications for Android, but they all depend on 3rd party libraries such as PCRE,OpenSSL and so forth. My experience has shown me that PCRE compiles without an error for Windows, but we are talking about Android here(running Linux kernel).

And would I need to write a C wrapper for EVERY function in the library to meet the JNI calling conventions?

2
  • Wrappers are only required for those function that you will call from Java. Since you're porting C applications, you won't need many wrappers. Commented Jul 22, 2012 at 17:28
  • But as I said, porting one app requires to compile the required library for Linux on the ARM architecture. Commented Jul 22, 2012 at 17:29

1 Answer 1

1

The Android NDK will compile standard C syntax, but Android does not have the same C stdlib library as desktops; instead it has its own alternative called Bionic. Sometimes when you compile large projects, you run into stdlib function calls that bionic doesn't support and you have to put a small workaround.

Sometimes popular libraries have existing JNI wrappers, otherwise you have to make a JNI call for the functions your applications call.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.