- 积分
- 1032
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-4-4
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
FORTRAN 读取 NETCDF解决undefine 诸如undefined reference to已有 5265 次阅读 2012-10-10 00:04 |系统分类:科研笔记|关键词:netcdf
当出现此类问题的时候
光靠 gfortran -o test w02.f90 -I/usr/local/netcdf/include -L/usr/local/netcdf/lib -lnetcdf 不能解决的,可以尝试gfortran -o test w02.f90 -I/usr/local/netcdf/include -L/usr/local/netcdf/lib -lnetcdf -lnetcdff 或gfortran -o test w02.f90 -I/usr/local/netcdf/include -L/usr/local/netcdf/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz
附上错误的提示,供以后参考
/tmp/ccKcBo4F.o: In function `MAIN__':
w02.f90:(.text+0x39): undefined reference to `nf_create_'
w02.f90:(.text+0x71): undefined reference to `nf_def_dim_'
w02.f90:(.text+0xa9): undefined reference to `nf_def_dim_'
w02.f90:(.text+0xfc): undefined reference to `nf_def_var_'
w02.f90:(.text+0x115): undefined reference to `nf_enddef_'
w02.f90:(.text+0x14e): undefined reference to `nf_close_'
/tmp/ccKcBo4F.o: In function `write_data_0_':
w02.f90:(.text+0x1a7): undefined reference to `nf_put_vara_int_'
/tmp/ccKcBo4F.o: In function `check_err_':
w02.f90:(.text+0x21d): undefined reference to `nf_strerror_'
collect2: ld 返回 1
|
|