08月14, 2017

编译NetCDF 4.2出现configure: error: Can't find or link to the hdf5 library.

configure时出现configure: error: Can't find or link to the hdf5 library. Configure with --disable-netcdf-4 or see config.log for errors.,即使用with-hdf5=指定了hdf5库的路径也不行。

只需要手动指定LDFLAGSCPPFLAGS就可以了,原因是configure里没有手动为hdf5库路径指定LDFLAGSCPPFLAGS

一个的典型的configure如下:./configure --prefix=/opt/software/NetCDF/4.2 LDFLAGS=-L/opt/software/lib CPPFLAGS=-I/opt/software/include

本文链接:https://debug.fanzheng.org/post/error-when-compiling-netcdf4.2.html

-- EOF --

Comments

评论加载中...

注:如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理。