gdal3.0编译集成hdf4库和hdf5库的方法

作者:朱金灿
来源:clever101的专栏

  在编译gdal3.0时集成hdf4和hdf5库时,需要修改源码目录下的nmake.opt对应的hdf4和hdf5部分,具体如下:

# Uncomment the following and update to enable NCSA HDF Release 4 support.下面主要是包含hdf4库的头文件和库文件
HDF4_PLUGIN = NO
HDF4_DIR =	D:\MyProject\ThirdPartyLib\CPlusPlus\hdf4\x64
!IF "$(DEBUG)" == "1"
HDF4_LIB =$(HDF4_DIR)\lib\hdf_D.lib $(HDF4_DIR)\lib\mfhdf_D.lib Ws2_32.lib

!ELSE

HDF4_LIB =$(HDF4_DIR)\lib\hdf.lib $(HDF4_DIR)\lib\mfhdf.lib Ws2_32.lib

!ENDIF

HDF4_INCLUDE = $(HDF4_DIR)\include
# HDF4 library newer than 4.2.5 has a SDreset_maxopenfiles/SDget_maxopenfiles
# interface which allows opening many HDF files simultaneously (the max
# number of files was previously hardcoded and too low, smth. like 32).
# Uncomment following if your library is newer than 4.2.5.
HDF4_HAS_MAXOPENFILES = YES

# Uncomment the following and update to enable NCSA HDF Release 5 support.下面主要是包含hdf4库的库文件
HDF5_PLUGIN = NO
HDF5_DIR =	D:\MyProject\ThirdPartyLib\CPlusPlus\hdf5\x64
!IF "$(DEBUG)" == "1"

HDF5_LIB =	$(HDF5_DIR)\lib\hdf5_D.lib

!ELSE

HDF5_LIB =	$(HDF5_DIR)\lib\hdf5.lib

!ENDIF

# Needed to define H5_BUILT_AS_DYNAMIC_LIB for windows compilation 
# scenarios where it is not exported on the target (non-CMake builds)
HDF5_H5_IS_DLL = YES

  其中已编译好的hdf4库和hdf5库在这里下载:hdf4库下载hdf5库下载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

clever101

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值