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

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

为什么大多数人学不会人工智能编程?>>> hot3.png

  在编译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库下载

猜你喜欢

转载自blog.csdn.net/clever101/article/details/128460607