This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: .../main.c: No such file or directory
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Subject: Re: .../main.c: No such file or directory
- From: Wanyu Li <wanyu_li at engr dot colostate dot edu>
- Date: Wed, 3 Oct 2001 10:38:30 -0600 (MDT)
- cc: Matt Hiller <hiller at redhat dot com>, Debbie Gilbert <dgilbert at nateng dot com>, gcc-help at gcc dot gnu dot org
Hi, Toon,
Thanks for the info, but I still haven't worked it out. My program is as
simple as
program main_f
real x,y
x = 10
y = 99
x = x*y
write(*,*)x
end
and I use these commands:
g77 -g -c ttt.f -o ttt.o
g77 -g -o ttt ttt.o
and I have test as belows:
gdb ttt
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) file ttt
Load new symbol table from "ttt"? (y or n) y
Reading symbols from ttt...done.
(gdb) list
46 ../../../../libf2c/libF77/main.c: No such file or directory.
Do you think it would be a problem else?
Thanks a lot!
Wanyu
-----------------------------------
500 w Prospec St.
6H Aggie Village
Ft.,Collins,80521 CO,U.S.A
tel:970-491-7192(w),970-491-6758(w),970-491-8898(h)
email:
wanyu_li@engr.colostate.edu
wanyu_li@yahoo.com
----------------------------------
On Wed, 3 Oct 2001, Toon Moene wrote:
> Wanyu Li wrote:
>
> > I recently moved to use g77 on Sun station. I compiled and linked a
> > fortran program with -g switch. When I get in gdb to debug the program,
> > I find that the symbols from the program are loaded in, but I can see the
> > source code by command 'list', I get a message of
> > '../../../../libf2c/libF77/main.c: No such file or directory.'
>
> This means that there is no main program in your Fortran sources, i.e.,
> something that starts with:
>
> PROGRAM BLAH
> ...
> END
>
> Kind regards,
>
> --
> Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
> Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
> Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
> Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
>