Cannot find -lf2c compilation error

Joe Smith jes at martnet.com
Tue May 19 17:24:07 UTC 2009


Paul Smith wrote:
> I am trying to compile a program which was written in C. (The Makefile
> is shown below.) However, when I run the command 'make', I get the
> following error:
> 
> $ make
> ... -L./f2c -lf2c -lm
> /usr/bin/ld: cannot find -lf2c
> ...

The f2c library is[*] part of the GNU Fortran runtime support. Are some 
of your source files written in Fortran? If not, then you don't need the 
f2c lib; just edit it out of the linking step.

If you do have some Fortran code lurking in there, then you will need 
the f2c library. It should be included with GNU Fortran, so there may be 
a problem with the linker options that's preventing ld from finding the 
library.

[*] Or was--it's been ten years since I used it.

<Joe




More information about the fedora-list mailing list