4 ms·
"Funky non-standard build system"?! While you do have the ndk-build script, NDK is just GCC (or clang, they're both included) preconfigured for cross-compiling
by izacus 12y ago
"Funky non-standard build system"?!
While you do have the ndk-build script, NDK is just GCC (or clang, they're both included) preconfigured for cross-compiling. You can easily use ANY C/C++ build system with it, just set CC, CXX, LD, etc. environment variables to point to the GCC build in NDK folders. That way you can practically compile anything from Linux (which uses only available libc calls), not the least ffmpeg, openssl, curl, whatever you need.
The JNI rules are exactly the same as JNI rules are for any desktop Java app that uses native code. There is nothing special or "funky" in NDK - it's all standard stuff you know from Linux if you ever used Java.
I'm noticing incredible amount of issues people have (at least in my sample helping them out in Freenode/#android-dev) due to not understanding this simple fact that NDK is just GCC and simply not understanding ANYTHING about how C/C++ app compiling works or not willing to learn basics of how JNI works.
- duaneb 12y agoI think he was referring to the build scripts and ecosystem, not the compiler.
- flohofwoe 12y agoThe compiler tools are fine, the problems are: (1) ndk-build scripts instead of Makefiles (2) C++ headers not in standard locations, (3) the Java build stuff which is still needed to build the final APK (ant, maven, gradle or whatever it is at the moment). All of this together qualifies as a 'funky non-standard build-system' in my book ;)