爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5940|回复: 2

FORTRAN 读取 NETCDF解决undefine 诸如undefined reference to

[复制链接]
发表于 2017-7-4 16:33:03 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

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


密码修改失败请联系微信:mofangbao
 楼主| 发表于 2017-7-4 16:34:08 | 显示全部楼层
科研网上转的帖子,的确好用,就拿过来了!!!!谢谢作者!http://blog.sciencenet.cn/blog-714229-620905.html
密码修改失败请联系微信:mofangbao
发表于 2017-11-11 23:05:10 | 显示全部楼层
解决问题,谢谢
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表