mingw - 使用内置源 geotiff 库构建 gdal 时出错

标签 mingw gdal msys geotiff

我正在尝试构建 gdal 1.9.2从源头。系统是Windows 7 64 bits我在 msys 工作环境。

我已经成功构建 zlib 1.2.7 , jpeg9a , proj 4.8.0 , tiff , geotiff 1.4.0geos 3.4.2 .

现在,在配置 gdal 时有了这个:

./configure --prefix=/d/PRUEBAS/LIBS/gdal_1.9.2/install/ --with-libz=/d/PRUEBAS/LIBS/zlib-1.2.7/install/lib --with-jpeg=/d/PRUEBAS/LIBS/libjpeg9a/install/bin --with-libtiff=/d/PRUEBAS/LIBS/libtiff/install_with_jpeg/bin --with-geos=/d/PRUEBAS/LIBS/geos_3.4.2/install/bin/geos-config  --with-static-proj4=/d/PRUEBAS/LIBS/proj_4.8.0/install/lib

我得到了这个(修剪了一下以显示相关部分):
GDAL is now configured for i686-pc-mingw32
  LIBTOOL support:           yes

  LIBZ support:              external
  LIBLZMA support:           no
  GRASS support:             no
  CFITSIO support:           no
  PCRaster support:          internal
  LIBPNG support:            internal
  GTA support:               no
  LIBTIFF support:           external (BigTIFF=no)
  LIBGEOTIFF support:        internal
  LIBJPEG support:           external
  GEORASTER support:         no
  GEOS support:              yes

  SWIG Bindings:          no

  Statically link PROJ.4:    yes
  enable OGR building:       yes
  enable pthread support:    yes
  enable POSIX iconv support:no, consider installing GNU libiconv
  hide internal symbols:     no

所以我知道所有配置都正确,因为我从源代码构建的库被检测到并显示为外部。

现在,如果我尝试构建 gdalgeotiff :
 --with-geotiff=/d/PRUEBAS/LIBS/libgeotiff_1.4.0/install/lib/libgeotiff

我最终收到了这条消息:
checking for libtiff... using libtiff from /d/PRUEBAS/LIBS/libtiff/install_with_jpeg/bin.
checking for TIFFScanlineSize64 in -ltiff... no
checking for XTIFFClientOpen in -lgeotiff... no
checking for XTIFFClientOpen in -lgeotiff... (cached) no
configure: error: We require at least GeoTIFF 1.2.1. Consider using the one supplied with GDAL

我已经为此苦苦挣扎了一段时间,但我没有找到解决它的方法。
你对如何解决这个问题有什么想法吗?

注意:
一些库是静态的:zlib , libgeotiff , tiff .

其他的可用作静态和动态库。

静态库位于:path_to_the_installation/lib .

动态库位于:path_to_the_installation/bin .

最佳答案

以下是 GDAL 站点上有关 Linux 配置的一些帮助:
http://trac.osgeo.org/gdal/wiki/BuildingOnUnix

我知道这不是您实际使用的系统,但是由于您使用的是 GCC 和 MinGW,因此其中有一个“警告”要点,涵盖了可能适用于您的类似声音的故障。也就是说,“配置”脚本对库版本不太了解。

因此,您可以尝试他们建议的解决方法并设置“--with-geotiff=internal”。

除此之外,我会尝试寻找在“配置:错误:”之前它产生那些行的地方。它是一个脚本,因此您应该能够在文本编辑器中看到它在做什么(甚至可以通过更改它来使其适合您)。

关于mingw - 使用内置源 geotiff 库构建 gdal 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21263602/

相关文章:

c++ - 如何在 Eclipse 中运行使用 MinGW 编译的 C++ 程序?如何 "link(?)"?

qt4 - 从 Fedora 12 上的 MinGW 交叉编译到 Windows - 控制台窗口?

c++ - VC++允许/##/作为宏的值——如何在eclipse/mingw-gcc中处理它?

python - 使用 python 将 16 位 GeoTiff 文件转换为 8 位 JPEG 文件

path - msys 路径转换(或 msys 的 cygpath?)

c# - 在 C# 或 VC++ 中导入 MinGW C++ DLL

python - 使用移位向量进行 GDAL 变形

python - 将 GeoTIFF 转换为 JPEG 并在 Python 中提取 GeoTIFF header

c - MSYS2:如何禁用路径名到驱动器号的自动翻译?

windows-7 - mingw/git bash shell 中的 jRuby 问题