Cygwin gfortran latest binary link failure

Mark Hadfield m.hadfield@niwa.co.nz
Fri Nov 18 01:35:00 GMT 2005


I just downloaded Cygwin gfortran:
 
http://quatramaran.ens.fr/~coudert/gfortran/gfortran-Cygwin-4.1-20051116-i686.tar.bz2

unpacked it in /usr/local/share/irun and set up a symbolic link to the 
executable as I have several times before. I try to compile and link a 
3-line "hello world" program (below) and get a linker error. Anyu ideas? 
I imagine this is a simple configuration problem, but it's well beyond me.

$ gfc -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with: ../trunk/configure --prefix=/svn 
--with-gmp=/usr/local/gmp --with-mpfr=/usr/local/gmp 
--enable-languages=c,f95
Thread model: single
gcc version 4.1.0 20051115 (experimental)

$ cat > hello.f90 << EOF
 > program hello
 > write (*,*) "Hello world"
 > end program
 >

$ gfc hello.f90
/usr/bin/ld: cannot find -lgfortranbegin
collect2: ld returned 1 exit status

(Minor note: the above archive has a top-level "svn" directory that was 
not there before. However moving everything up one level and deleting 
"svn" does not affect the linker problem.)


-- 
Mark Hadfield          "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)



More information about the Fortran mailing list