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

Re: Error Fortran Message



>Dear Sir:
>   I installed debian software for linux in my machine and it's ok. when
>I try to install gcc_2.7.2.1-8 with g77=0.5.20-1.deb also it's ok. For compile
>Fortran program contain only main program, g77 or f77 command can compile and
>I get the execute file for this program. But when I try to compile subroutine
>ex. aa.f to get the execute file aa.o by the command f77 aa.f or g77 aa.f I
>get error message which is {/usr/lib/gcc-lib/i486-linux/2.7.2.1/libf2c(main.o):
>in function "main": main.o(.text+ox154): undefined reference to "MAIN_"}. At
>the same time I can't execute any program contain subroutine. could you
>please tell me how can I solve this problem.

Try using "g77 -c aa.f" to generate the object file "aa.o".  I haven't
used g77 but I suspect that "g77 -o prog mainprog.c aa.o" will then
allow you to create an executable program.  Here "mainprog.c"
represents a FORTRAN program that calls the subroutine in "aa.f" and
"prog" is the name of the executable program.

>
>Sincerely
>A.I. Abou Anber


------   Dr. Raymond Rusk   ------|\^/|------------Internet: ---------
         Network Services      _|\|   |/|_       rrusk@uvic.ca 
      University of Victoria   >         <   Voice: (250) 721-7654 
------ Victoria, BC V8W 3P4 ---->_./|\._<----  Fax: (250) 721-8778 ---


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: