Re: fortran90 code
Re: fortran90 code
- Subject: Re: fortran90 code
- From: Michael Paluszek <email@hidden>
- Date: Sun, 22 Jul 2007 14:38:00 -0400
I just build a FORTRAN .o file and add it to my xCode project. This
call is from C++.
// Call the FORTRAN update. To recompile type gfortran -O2 -c *.f90
in the terminal.
for(int k = 0; k < nSteps; k++ )
steppingmotor_( sA, dT, kM, r, nR, inertia, damping, l, uA, uB );
which is calling
SUBROUTINE steppingmotor( x, h, kM, r, nR, inertia, damping, l, uA, uB )
IMPLICIT NONE
etc.
This is the standard way to call FORTRAN from C.
Sincerely,
Mike
On Jul 22, 2007, at 2:23 PM, I. Savant wrote:
On Jul 22, 2007, at 1:20 PM, Paul Gribble wrote:
I have a code snippet in fortran 90 that I wish to incorporate
into a cocoa
(obj-C) program. What's the best way to proceed?
The best way? IMO, it's to rewrite it in C. I know of no packages
that allow you to run Fortran code in a Cocoa application. There
may be open source code out there that allows you to do so from C
in general which should work just fine in an Objective-C app, but
your search is as good as mine ...
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
------------------------------------------------------
Michael Paluszek
Princeton Satellite Systems
33 Witherspoon Street
Princeton, NJ 08542-3207
Phone (609) 279-9606
Fax (609) 279-9607
email@hidden
www.psatellite.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden