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库的路径也不行。
只需要手动指定LDFLAGS和CPPFLAGS就可以了,原因是configure里没有手动为hdf5库路径指定LDFLAGS和CPPFLAGS。
一个的典型的configure如下:./configure --prefix=/opt/software/NetCDF/4.2 LDFLAGS=-L/opt/software/lib CPPFLAGS=-I/opt/software/include

Comments