Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
gfortran libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gfortran libraries



I just installed Xcode 2.5 on a G5 with OS 10.4.10, then gfortran 4.3.
I'm trying to compile NASA's readavg.f90 code that I got from http://www-cave.larc.nasa.gov/cave/pages/misc/readavg.f90, which gives:


% gfortran -o readavg readavg.f90
/usr/bin/ld: warning can't open dynamic library: /libgcc_s.1.dylib referenced from: /usr/local/lib/gcc/powerpc-apple-darwin8.9.0/4.3.0/../../../libgfortran.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)


The executable crashes with:

% ./readavg
At line 77 of file readavg.f90 (unit = 1, file = ' ')
Fortran runtime error: File ' ' does not exist

So it seems that line 31:

Call getarg(1,filename)


is not compiled properly.

If I introduce the -static option, I get this error:

% gfortran -o readavg readavg.f90 -static
/usr/bin/ld: can't locate file for: -lcrt0.o
collect2: ld returned 1 exit status

Is there anything I can do to solve the dynamic library issue, which seems to be the real cause of the problem?

Thanks,
Chris

--
Chris A. Gueymard, PhD
Solar Consulting Services
P.O. Box 392
Colebrook, NH 03576, USA
Tel. (514) 750-1634
http://www.SolarConsultingServices.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Fortran-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.