Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

(Question) JNI and Fortran

  • 10-07-2010 2:01pm
    #1
    Registered Users, Registered Users 2 Posts: 162 ✭✭


    Hey

    Not sure if this is the right forum, but I've a question about the Java Native Interface.

    I'm trying to put a java interface on top of a fortran program. Doing some research, I've read that people can do by using the JNI and c code (as the intermediate).

    I've compiled the java code.. fortran code.. and c code.. but when I try to link them all together (on OS X), I get the following:

    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

    If anyone has done this before, I can forward on the code to see if its something small I'm doing wrong.

    The above worked with a different example program, just Java to C. I'm a bit lost here :confused: So any help would be appreciated!

    Thanks


Advertisement