ifort netcdf函数库 makefile 出错
如题ifort编译器,用到netcdf函数库,用makefile 时能生成.o文件,但就是找不到netcdf库
netcdf是用ifort编译器编译的
makefile是这样写的:
OBJS = rdnc.o module_namelist.o sub_rw_nc.o sub_time.o module_interp.o sub_smooth.o sub_maskarray.o
RM = rm -f
FC90 = ifort
FFLAGS = -O2 -convert big_endian
FLFLAGS = -L/data/netcdf/lib -lnetcdf -I/data/netcdf/include
all: aa.exe
aa.exe: $(OBJS)
$(FC90) $(FFLAGS) $(FLFLAGS) -o $@ $(OBJS)
.SUFFIXES: .f90 .o
%.o : %.mod
.f90.o:
$(FC90) $(FFLAGS) $(FLFLAGS) -c $<
rdnc.o:module_namelist.o sub_rw_nc.o sub_time.o module_interp.o sub_smooth.o sub_maskarray.o
module_namelist.o:
sub_rw_nc.o:
sub_time.o:
module_interp.o:
sub_maskarray.o:
sub_smooth.o:
clean:
rm -f *.exe *.o *.mod
运行结果是所有的.o文件都能生成,但出现这样的错误:
ub_rw_nc.f90.text+0x7d): undefined reference to `nf_open_'
sub_rw_nc.f90.text+0xde): undefined reference to `nf_open_'
sub_rw_nc.f90.text+0x150): undefined reference to `nf_strerror_'
。。。。。。。
还有很多
这些错误貌似是 提示找不到netcdf的库函数
急问 问题是出在哪里呢?
在线等
谢谢 本帖最后由 xinshou6 于 2020-02-14 19:35 编辑
删除键在哪 我误入了
页:
[1]