I am using Ubuntu 10.04 and trying to compile some code that uses gfortran. At some point Makefiles does:
-L. -lgfortran
and I get the error
/usr/bin/ld: cannot find -lgfortran
although it is installed:
ldconfig -p | grep fortran
libgfortran.so.3 (libc6,x86-64) => /usr/lib/libgfortran.so.3
How can I fix it?
P.S: The Makefile:
## FLAGS
CC:= gcc
C++:= g++
CFLAGS:= -c -O -Dintel -g
FC:= gfortran
FFLAGS:= -c -O -cpp -g
LD:= g++
LDFLAGS:= -O
WETTER_CGAL_FLAGS:= -g
#WETTER-Data
WETTER_cgal: weather.cpp surface_alg.h $(WETTER_CGAL_OBJECTS) WATT_interface.h data.cpp
$(C++) $(WETTER_CGAL_FLAGS) -c weather.cpp -frounding-math
$(C++) -c data.cpp -frounding-math
$(LD) $(WETTER_CGAL_OBJECTS) weather.o data.o -o WETTER_cgal -L. -lgfortran -lgmp -lCGAL -frounding-math -fp-model
See Question&Answers more detail:os