java - Can I call a C function from a C program called by JNI? -


i have done research jni,and think understand how works, i've been trying call c function c func called jni.

i have 2 .c, helloworld , helloworld2, , java program call helloworld. helloworld @ same time calls function defined in hellowold2 causes error when executing.

java: symbol lookup error: /home/hduser/desktop/final2/libhello.so: undefined symbol: helloworld

assuming have 2 files:

helloworld.c helloworld2.c

and helloworld supposed call helloworld2 can:

  • put both same shared lib
  • put both separate shared lib , make sure helloworld linked helloworld2

make sure shared libraries visible setting ld_library_path.

you can find jni samples here: http://jnicookbook.owsiak.org/


Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -