Re: [Rd] Calling C from Fortran

2005-06-15 Thread Huntsinger, Reid
GUILLOT [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 15, 2005 11:50 AM To: [EMAIL PROTECTED] Cc: Huntsinger, Reid Subject: Re: [Rd] Calling C from Fortran Thanks for your reply. Am I write if I say that the wrapper shoul be double F77_SUB(mygammafn)(double *x) { return gammafn(*x); } ins

Re: [Rd] Calling C from Fortran

2005-06-15 Thread Gilles GUILLOT
at > Fortran <-> C conventions. > > Reid Huntsinger > > -Original Message- > From: Gilles GUILLOT [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 15, 2005 3:50 AM > To: Huntsinger, Reid > Subject: Re: [Rd] Calling C from Fortran > > > Thanks Reid! >

Re: [Rd] Calling C from Fortran

2005-06-14 Thread Huntsinger, Reid
The C wrappers are there to align the linking conventions expected by the Fortran compiler (usually subroutine/function foo has its entry point in the object file indicated by a symbol foo_, but it depends on the platform) to that of the C compiler. (The C compiler just uses the function name.) The