问题描述
我正在尝试使用 Cygwin 为 GDAL 安装 HDF4 库,并且自述文件指示我这样配置源代码:
./configure <--disable-fortran>
--enable-hdf4-xdr
--with-zlib=/path_to_ZLIB_install_directory
--with-jpeg=/path_to_JPEG_install_directory
<--with-szlib=/path_to_SZIP_install_directory>
--prefix=/path_to_HDF4_install_directory
但是,我似乎无法正确理解 部分。执行时返回错误:
-bash: --disable-fortran: No such file or directory
我做错了什么?我是编程新手。
编辑:
这是自述文件的链接:https://support.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/release_notes/INSTALL_CYGWIN.txt
解决方法
正如丹尼斯所写,您误解了 <..> 的含义。在这种情况下 它们是可选的非强制配置
./configure <--disable-fortran>
--enable-hdf4-xdr
--with-zlib=/path_to_ZLIB_install_directory
--with-jpeg=/path_to_JPEG_install_directory
<--with-szlib=/path_to_SZIP_install_directory>
--prefix=/path_to_HDF4_install_directory
所以一种可能的方法是包含第一个而不是第二个:
./configure --disable-fortran
--enable-hdf4-xdr
--with-zlib=/path_to_ZLIB_install_directory
--with-jpeg=/path_to_JPEG_install_directory
--prefix=/path_to_HDF4_install_directory