This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Attached file may help you. If you use c++ instead of c, the prototypes of fortran subroutines are begin with the keyword [[extern "C" ]] Best Regard Dan, Ho-Jin Juan Nastri wrote: >Hello, >I am writing a new main for an old program written in fortran and I am >looking for a light somewhere. >The general idea is to use the old fortran subroutines, and make the new >main in plain C. >I have read a lot of pages, speaking about mixed language, and a lot of >different things where suggested. >But what I need is quite simple. I need a concrete example on how to >link a subroutine.f with a main_program.c. >Lets say, that the subroutine uses 2 integer as a parameters. >Exactly what should I tell to gcc and g77 to correctly compile this?? >and example of a makefile would be usefull too! > >Thank you at least to read this. If you can help me, I would be very >happy. >Juan >Ps. Please, forgive my poor english, is not my natural language. > > >
Attachment:
f2c.tar.gz
Description: GNU Zip compressed data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |