This is the mail archive of the cygwin@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
Re: CFORTRAN for cygwin/egcs?
- To: Richard Stanton <stanton@haas.berkeley.edu>
- Subject: Re: CFORTRAN for cygwin/egcs?
- From: Mumit Khan <khan@xraylith.wisc.edu>
- Date: Mon, 15 Mar 1999 16:27:33 -0600 (CST)
- cc: cygwin@sourceware.cygnus.com
- Delivered-To: listarch-cygwin@sourceware.cygnus.com
- Delivered-To: mailing list cygwin@sourceware.cygnus.com
- In-Reply-To: <000f01be6f12$cf737f60$893a85d1@CONNOR.berkeley.edu>
- Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
- Sender: cygwin-owner@sourceware.cygnus.com
On Mon, 15 Mar 1999, Richard Stanton wrote:
> There's a rather useful package called CFORTRAN, that makes calling FORTRAN
> subroutines from C, and vice versa, very simple, on the machines it knows
> about.
>
> Has anyone got this working with egcs gcc/g77 under NT? If so, I'd
> appreciate any pointers or examples you may have.
Hmmm ... it's been years since I've used, but from what I remember, it
should be pretty trivial to use with gcc/g77 on Windows32. I believe the
magic was to define -Df2cFortran (or something like that) and the rest
just worked.
One potential gotcha, and only applicable if you're using gcc/c++ as the
link driver instead of using g77, is that f77 runtime library bundled with
g77 has been renamed from libf2c.a to libg2c.a, and so you'll need to link
with -lg2c instead of -lf2c.
$ gcc -Df2cFortran -c cfile.c
$ g77 -c ffile.f
$ gcc -o mixedprog ffile.o cfile.o -lg2c
What problems have you had?
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com