This is the mail archive of the email@example.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
Re: jni,egcs1.1.2 compiling problem
- To: John McNally <firstname.lastname@example.org>
- Subject: Re: jni,egcs1.1.2 compiling problem
- From: Mumit Khan <email@example.com.EDU>
- Date: Wed, 21 Apr 1999 23:00:02 -0500
- cc: "firstname.lastname@example.org" <email@example.com>
John McNally <firstname.lastname@example.org> writes:
> Thank you for all your help. Your Fortran JNI example worked fine as
> delivered. However I tried making the fortran function have an integer
> in its argument list. If the function does nothing with the integer
> passed to it it will return ok. If the integer is used in the function,
> however, the program crashes.
> This does not appear to be related to JNI, but in calling the Fortran
> routine from C. I'm sure this sort of thing must have been ironed out
> long ago, so it is probably the way I'm doing it.
> I did try compiling with the -mrtd option. I'll try some more tomorrow.
Using my example, you don't need, and don't want, -mrtd.
You're right that it's an issue of C to F77 interfacing. Since it's rather
off topic for this list, I suggest you go over to comp.lang.fortran and
ask. Carsten Arnholm has (at least used to a few years ago) a nice
tutorial at http://home.sol.no/~arnholm/ which you want to check.
Just remember that most implementations of f77 pass arguments by
reference, so the following will match:
subroutine f77sub (i)
int i = 5;
Want to unsubscribe from this list?
Send a message to email@example.com