Re: help: interfacing between C and fortran program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: pgp2MvjhWchtV.pgp
Description: PGP signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux