- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a Fortran DLL which is used by a Fortran code; but this DLL will also be used by a Java application.
My question relates to passing character strings. Assume I have the following subroutine in my DLL:
I do not want to change the calling convention from within the DLL, so it's just a matter of having the right interface to MY_SUB on the Java side.
Does anybody know how to handle this?
Thanks,
Olivier
My question relates to passing character strings. Assume I have the following subroutine in my DLL:
[bash]SUBROUTINE MY_SUB(R,S,I) !DEC$ ATTRIBUTES DLLEXPORT :: MY_SUB REAL(8),INTENT(IN) :: R(100) CHARACTER(24),INTENT(IN) :: S INTEGER,INTENT(OUT) :: I !... do some work here... END SUBROUTINE MY_SUB [/bash]
I do not want to change the calling convention from within the DLL, so it's just a matter of having the right interface to MY_SUB on the Java side.
Does anybody know how to handle this?
Thanks,
Olivier
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You might start with this article, written by our own Lorri Menard, back in the CVF days. The other article she links to still exists.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve. That's a good introduction indeed.
Olivier
Olivier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These
links can also be useful
http://oms.javaforge.com/wiki/66061
https://jna.dev.java.net/#getting_started
https://nlink.dev.java.net/tutorial.html
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page