This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
GNU Fortran 77 Can't OPEN a file, Possible cause use of libg2c.a
- To: <help-gcc at gnu dot org>
- Subject: GNU Fortran 77 Can't OPEN a file, Possible cause use of libg2c.a
- From: "Al Garber" <agarber at maxtc dot com>
- Date: Fri, 14 Jul 2000 12:33:00 -0500
- Cc: <Cynthia at m>
- Disposition-Notification-To: "Al Garber" <agarber@maxtc.com>
I'm porting a large Fortran program to GNU Fortran 77. I can compile and
link, but at the first occurance of an OPEN statement:
OPEN(UNIT=LU_INPUTS,FILE=INFILE,STATUS='OLD',
& ERR=500)
a window pops up that says:
The instruction at 0x6101a40d referenced memory at 0x00000020. The memory
could not be "read".
I am compiling with the -fno-underscoring and -fno-backslash options in a
Cygnus window. I link with the following ld command:
ld -o ../work/megasim.exe *.o ../lib/crt_noglob.o ../lib/crt2.o -L ../lib
-lm -lc -lg2c -lgcc -lmsvcrt40 -lcygwin -lmingw32 -lkernel32 -lglu32 -lgdi32
-luser32 -lwsock32
I don't know which libraries I should be linking with. I do know that
libg2c.a defines references that may relate to file I/O such as _do_fio,
_iopen, and _f_open which may be used at runtime when executing the OPEN
statement. I'm using gcc version 2.95 19990728 (release)gcc version 2.95
19990728 (release) to compile and link.
Please suggest possible solutions to the problem?
Thanks,
Al Garber
Senior Staff Engineer
Maximum Technology Corporation
Voice (256) 864-7630 Ext.118
Fax (256) 864-0610
Al.Garber@maxtc.com
winmail.dat