1. No idea, but maybe a more complete example that compiles and runs and
shows the problem would help. Bonus points for reproducing with localhost JVM,
and not android
2. Yeah, that's how asyncdispatch works. You have to run the loop to make
async things happen. In your case you run it by
@yglukhov, thanks, it was helpful. For most cases the functionality of java
interface implementation works.
But in some cases I get error at runtime:
java_vm_ext.cc:504] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called
with pending exception java.lang.NullPointerException: Expected
@alexsad, take a look at
[https://github.com/yglukhov/android](https://github.com/yglukhov/android)
thanks a lot mashingan! It is working!
Now I am going to implement JNI to call java classes(some SDK has been already
developed in Java) for manage android application.
you forgot to link libm, add option `-lm` at very end.
Hi
finelly is works!
I tried the way suggested Tetralux via make_standalone_toolchain.py and then
clang.
Simple echo works, but I tried simple pow from math and clang doesn't compile
it:
import math
var a = pow(5.09, 2.33)
clang -I
Hmm, I'm not sure, all I can say is the cross compiler cannot find the sysroot
This the exact command line I did and it success
\nimcache>arm-linux-androideabi-gcc -I d:/installer/nim/lib hello_android.c
stdlib_system.c -o hello
Hi mashingan,
I tried cross-compile the same hello.nim from linux and **got the same errors
exactly like in windows**.
what I did:
1. Cloned nim-lang branch master from github and compled it.
2. Downloaded android ndk
3. Defined all needed paths in PATH
4. Compile hello.nim: nim c
> cd C:\Users\uname\Documents\nimapps\jnijava\
> set
PATH=%PATH%;C:\Users\uname\Documents\apps\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin
> nim c --cpu:arm --os:android --compileOnly hello.nim
> cd nimcache
>
Could you give the command-line you typed?
For example, what I did was like this
arm-linux-androideabi-gcc.exe -I "C:/Nim/lib" hello.c stdlib_system.c -o
hello
--sysroot="C:/Users/uname/Documents/apps/android-ndk-r16b/platforms/android-19/arch-arm"
Hi mashingan,
thank you for suggestion and I tried all this /," and // possibilities but
errors are the same.
any other suggestions? maybe I have not prepared some things...
Have you tried `/` in path string instead of `\` as path separator ?
Also you can try adding `"`.
Very likely because you were using `\` so gcc couldn't find the correct path.
See my example above all using `/`.
Hi,
I tried last example. Unfortunately doesn't work for me.
C:\Users\uname\Documents\nimapps\jnijava\nimcache>arm-linux-androideabi-gcc.exe
-I C:\Nim\lib hello.c stdlib_system.c -o hello
--sysroot=C:\Users\uname\Documents\apps\android-ndk-r16b\platforms\android-19\arch-arm
Thank you, I did different approach. I followed from this stackoverflow thread
about cross compiling
14 matches
Mail list logo