I'm having trouble building the JNI example at
http://davanum.wordpress.com/2007/12/09/android-invoke-jni-based-methods-bridging-cc-and-java/
.

First up, is it possible to actually do this from windows? Do I have
to do this in a linux environment? I would think that doing this from
windows is possible, but I don't have jdk/include/linux, just jdk/
include/win32, so that's throwing me.

Second, I am at step 6, and am attempting to use arm-none-linux-
gnueabi-gcc.
$ arm-none-linux-gnueabi-gcc  -I/cygdrive/c/Program\ Files/Java/
jdk1.6.0_04/include/ -I/cygdrive/c/Program\ Files/Java/jdk1.6.0_04/
include/win32/  -fpic -c org_apache_NativeAdd.c

In file included from org_apache_NativeAdd.c:1:
org_apache_NativeAdd.h:2:17: error: jni.h: No such file or directory
In file included from org_apache_NativeAdd.c:1:
org_apache_NativeAdd.h:15: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'jlong'
org_apache_NativeAdd.c:3: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'jlong'

Ok. Cygwin + arm-none-linux-gnueabi-gcc didn't want to seem to include
anything like that, so I just flat out copied over the contents, and
it was happy to include them. Unfortunately, it didn't want to build
them, giving me other errors like those seen above.

What do I have set up incorrectly for building JNI?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to