NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi There, I am at the end of my rope and i need help! I am trying to compile a fortran program on my mac (MB Pro 10.6.8). It uses some netCDF stuff, fortran 90, etc... (A copy of the makefile is pasted below.) previous versions of this code have compiled here (using netCDF) and are still working. anyway, it builds the .o files fine: gfortran -O2 -w -ff2c -fbounds-check -static -I/sw/lib/netcdf-gfortran/include -c DataArrays.f90 gfortran -O2 -w -ff2c -fbounds-check -static -I/sw/lib/netcdf-gfortran/include -c Constants.f90 gfortran -O2 -w -ff2c -fbounds-check -static -I/sw/lib/netcdf-gfortran/include -c Deform.f90 gfortran -O2 -w -ff2c -fbounds-check -static -I/sw/lib/netcdf-gfortran/include -c InputOutput.f90 gfortran -O2 -w -ff2c -fbounds-check -static -I/sw/lib/netcdf-gfortran/include -c timestep.f gfortran -O2 -w -ff2c -fbounds-check -static -I/sw/lib/netcdf-gfortran/include -c swlon.f gfortran -O2 -w -ff2c -fbounds-check -static -I/sw/lib/netcdf-gfortran/include -c swlat.f gfortran -O2 -w -ff2c -fbounds-check -static -I/sw/lib/netcdf-gfortran/include -c most_db.f then it does this: gfortran -O2 -w -ff2c -fbounds-check -static InputOutput.o Deform.o DataArrays.o Constants.o timestep.o swlon.o swlat.o most_db.o -L/sw/lib/netcdf-gfortran/lib -lnetcdf -lnetcdff -o most_db /usr/bin/ld_classic: unknown flag: -no_compact_unwind collect2: ld returned 1 exit status make: *** [most_db] Error 1 what are ld_classic and -no_compact_unwind? Is this even a netCDF issue, or something else entirely? my gfortran is GCC 4.6.2 and lives in /sw/bin/ i have netcdf libraries in /sw/lib AND in /sw/lib/netcdf-gfortran (i have no idea how they ended up in two places, FINK??) i have netcdf.inc in /sw/include AND in /sw/lib/netcdf-gfortran/include my netcdf version is 3.6.3 (i think...) Any insights greatly appreciated! -jose ======MAKEFILE=============== # gnu fortran FC = gfortran FFLAGS = -O2 -w -ff2c -fbounds-check -static #INC = /sw/include INC =/sw/lib/netcdf-gfortran/include #LIB = /sw/lib -lnetcdf #LIB = /sw/lib/netcdf-gfortran/lib -lnetcdf -lnetcdff -L/sw/lib -lnetcdf -lnetcdff LIB = /sw/lib/netcdf-gfortran/lib -lnetcdf -lnetcdff EXE = most_db OBJ = InputOutput.o Deform.o DataArrays.o Constants.o \ timestep.o swlon.o swlat.o .SUFFIXES : .mod .f90 .f all: ${EXE} decimateBathy InputOutput.o: DataArrays.o Constants.o Deform.o .f90.o: ${FC} ${FFLAGS} -I${INC} -c $< .f.o: ${FC} ${FFLAGS} -I${INC} -c $< ${EXE}: ${OBJ} most_db.o ${FC} ${FFLAGS} ${OBJ} most_db.o -L${LIB} -o ${EXE} decimateBathy: ${OBJ} decimateBathy.o ${FC} ${FFLAGS} ${OBJ} decimateBathy.o -L${LIB} -o decimateBathy .PHONY : clean clean: /bin/rm -f *.o *.oo *.ipo *.exe *.mod *.L distclean: clean /bin/rm -f ${EXE} decimateBathy =====END=MAKEFILE============
netcdfgroup
archives: