This is the mail archive of the gcc@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]

FORTRAN -- LINKING PROGRAMS


I just obtained G77 and got my first (4 line) 
program to work.  I have the following higher 
priority questions: 

1. I tried 
     g77 fortfile > printfile
   I wanted to get my compiler error messages to go 
   to "printfile".  It did not work (i.e. the error 
   messages continued to go to the screen). Is there 
   an easy way to get my compiler error messages to 
   go to a file? 
   
2. Typically when I have used for FORTRAN in the 
   past and have had large programs with many 
   subroutines, I have precompiled some of the 
   programs and link edited combining precompiled 
   subroutines with the source code of uncompiled 
   subroutines.  My guess is that this is easy to do 
   with G77 but was unable to find an example in the 
   documentation.  Basically I need two steps:

   A. How do I compile source code of a subroutine 
      to some kind of object code (rather than 
      creating an executable file)? 

   B. How to I link edit, combining object code from 
      multiple subroutines (possibly with the source 
      code of another subroutine) ?

   If would be great if I could get a sketch of a 
   simple example for doing these two steps.
   
I have the following lower priority questions:
   
1. Is it easy to have a subroutine library using 
   procedures similar to the ones described above? 
   
2. I have combined C and FORTRAN routines in the 
   past using the ABSOFT PC compiler.  Do you have a 
   simple example showing the link edit steps for 
   doing this with the GNU compilers?  I may which 
   to go either way (FORTRAN calling C or C calling 
   FORTRAN.) 

Any help on the above matters would be greatly 
appreciated.

I would appreciate a brief note acknowledging 
receipt of this email. 
   
Thanks,
Bob Kuhn


__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]