www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - how to invoke D from java through JNI ? [ Linux ]

hi, all
    I'm using ubuntu gutsy, and can run most D and java programs.
    Now I can call c functions from java through JNI.
    I need convert .o file to .so  for c files. But when I did so with D
files, It did not work, and output the error message as :


/mnt/work/dev/d/java/jni3/libfunc.so: undefined symbol: _Dmodule_ref
java: symbol lookup error: /mnt/work/dev/d/java/jni3/libhello.so:
undefined symbol: hello


  I write a simpile build file in the attachement jni.zip .
  Note : My jdk is installed in /mnt/soft/jdk , you should correct this
if you want to run the build file.


Nov 07 2007