This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [newbie] "linker input file unused because linking not done"?


On 11/25/2011 4:56 PM, Tom Roche wrote:

I have a Makefile with

FC     = gfortran
FFLAGS = -ffixed-line-length-132 -w -c -m64 -march=native -funroll-loops --param max-unroll-times=4 -ftree-vectorize -ftree-vectorizer-verbose=0 -O2 -I$(NETCDF)/include -I$(IOAPI_ROOT)/src -I.
LIBS   = -L$(IOAPI_ROOT)/lib -lioapi \
          -L$(NETCDF)/lib -lnetcdff -lnetcdf



gfortran: warning:<object filename here/>: linker input file unused because linking not done


Yes, the -c in FFLAGS tells gfortran not to pass a command to ld. It's usual to leave -c out of FFLAGS and add it explicitly to the rules for making .o and .mod files etc.



-- Tim Prince


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]