you forgot to link libm, add option -lm at very end.
2018-03-21 10:41:26

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.

2018-03-22 11:39:52

@yglukhov, thanks a lot. It is nice.

now I can some trouble: I can't implement some listeners

for example after the defination a Button:

import jnim
import android.widget.textview
import android / content / [ context ]
import android.view.on_click_listener

jclass android.widget.Button* of TextView:
    proc new*(ctx: Context)
    proc setText*(text: string)
    proc setOnClickListener*(onClick: OnClickListener)
... and Button object is working properly in my android application but I can't implement OnClickListener for this button

additional created on_click_listener.nim:

import jnim
import android.view.View

jclass android.view.OnClickListener* of JVMObject:
    proc onClick*(v: View)

...and I don't know what do next?

2018-04-13 13:55:24
@alexsad, jnim has an experimental functionality to allow java interface implementation: https://github.com/yglukhov/jnim/blob/master/tests/test_jni_export.nim#L37-L71
2018-04-15 07:09:43
<<<••12••>>>