Good day, friends.
I have a lot of questions about NDK development, because I'm really newbie in C++ and nobody in our organization knows this topic well (native libraries and Android).
1. I generated Cpp-header file by javah and compiled Java class. I opened this file in Visual Studio 2010 Express, and, of course "#include <jni.h>" was marked as wrong import. I added path to "jni.h" through Properties Manager ->Configutation Options -> VC++ Directories -> Include directories (translation can be wrong cause I have Russian version and I have to re-translate it to English). Now, header file doesn't show any error, but cpp-file (which uses h-file) marks "jstring" as an error.
What's a problem?
2. I found something strange in generated header.
I have an example (not mine):
As you can see, my generated file hasn't variable names in signature (only types) and another one has types and names in signature.
Also, "JNIEnv*" differs from "JNIEnv *" (sic!)
3. I tried to compile ready example by Android NDK: I had copied Android.mk, Application.mk, and then I tried to execute ndk-build from Cygwin. But Cygwin replied:
Thanks for future answers
I have a lot of questions about NDK development, because I'm really newbie in C++ and nobody in our organization knows this topic well (native libraries and Android).
1. I generated Cpp-header file by javah and compiled Java class. I opened this file in Visual Studio 2010 Express, and, of course "#include <jni.h>" was marked as wrong import. I added path to "jni.h" through Properties Manager ->Configutation Options -> VC++ Directories -> Include directories (translation can be wrong cause I have Russian version and I have to re-translate it to English). Now, header file doesn't show any error, but cpp-file (which uses h-file) marks "jstring" as an error.
What's a problem?
2. I found something strange in generated header.
Code:
JNIEXPORT jstring JNICALL Java_com_dsp_NativeSample_nativeFunction
(JNIEnv *, jobject);
Code:
void Java_com_example_Physics_DoFFT(
JNIEnv* env,
jobject thiz,
jdoubleArray data,
jint size)
Also, "JNIEnv*" differs from "JNIEnv *" (sic!)
3. I tried to compile ready example by Android NDK: I had copied Android.mk, Application.mk, and then I tried to execute ndk-build from Cygwin. But Cygwin replied:
I definitely saw make package. How to define GNUMAKE variable?ERROR: Cannot find 'make' program. Please install Cygwin make package or define GNUMAKE variable to point to it.
Thanks for future answers
