[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-fortran
Subject: Re: help: interfacing between C and fortran program
From: Ingo Krabbe <ikrabbe.ask () web ! de>
Date: 2005-09-14 7:55:49
Message-ID: 200509140956.03660.ikrabbe.ask () web ! de
[Download RAW message or body]
Am Mittwoch, 14. September 2005 08:39 schrieb Gaurav Gautam, Noida:
> Hi,
>
>
> I have a function written in fortran say fun(x, y), with x and y as integer
> (scalars) . Function returns integer.
>
>
> I need to call this function from a C program. How do I do it.
> Can some one help me.
>
> Does Gfortran and gcc support this. ??
>
>
> Regards
> Gaurav
Yes, of course you can interface the function from C. There are some hints
how to write the exact interface prototypes for your C/C++ function
declaration on the `info g77' info pages.
You should try to use f2c to generate your interfaces at least for the first
time. See the hints on the info pages:
# info g77 "Other Languages" "Interoperating"
There you will find all you need !
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic