Java interface for Fortran code (via JNI?)
Hey folks,
Just wondering if someone can help me here. I'm trying to get a GUI over some fortran code. I've read in various places that its possible using the JNI. So you link the various pieces of code into a shared library and use that with the java GUI. Has anyone here actually got it to work? I think you need to go Java -> C -> Fortran.
I've found one or two tutorials but they're not very detailed. With some example code (from here: http://www.csharp.com/javacfort.html), I can compile the .java, .c and .f code, but have problems when it comes to creating the shared library.
gcc -dynamiclib -o libmycodeinc.jnilib CCode.o FortranCode.o
Undefined symbols:
"__gfortran_st_write", referenced from:
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
"__gfortran_transfer_integer", referenced from:
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
"__gfortran_st_write_done", referenced from:
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
_sumsquaredf_ in FortranCode.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Anyone any ideas?
Thanks for your help!



