Question on linking files using gfortran

François-Xavier Coudert fxcoudert@gmail.com
Thu Sep 22 12:43:00 GMT 2005


> gfortran -v -o tt.out fconst.o fmainumf.o iointers2.o fullsubsglb.o fumfintfc.o fumfsubs.o fo1schm.o fo1schem_umf.o fumfitersubs.o fumfraops.o fpmlsubs.o -lblas -lumfpack  -L../../libs

This is not a problem with gfortran, but a problem with the general
linker command-line syntax. Libraries should come in a very carefully
studied order: libumfpack relies on functions provided by libblas,
thus -lblas should come *after* -lumfpack.

The following should work:

gfortran -v -o tt.out fconst.o fmainumf.o iointers2.o fullsubsglb.o
fumfintfc.o fumfsubs.o fo1schm.o fo1schem_umf.o fumfitersubs.o
fumfraops.o fpmlsubs.o -lumfpack -lblas  -L../../libs

FX



More information about the Fortran mailing list