用cygwin编译gdal遇到的,用vs2017编译就没有该问题。
In file included from cpl_json.cpp:32:
./cpl_json_header.h:36:10: fatal error: 'json.h' file not found
对比发现,在cygwin中缺少包含的头文件-I../frmts/zlib -I../ogr/ogrsf_frmts/geojson/libjson,其实不是这个原因,是下面语句中路径里包含了/cygdrive/e,比如-I/cygdrive/e/osg-osgearth-source/other_3rdParty/gdal-2.3.2/alg -I/cygdrive/e/osg-osgearth-source/other_3rdParty/gdal-2.3.2/ogr -I/cygdrive/e/osg-osgearth-source/other_3rdParty/gdal-2.3.2/ogr/ogrsf_frmts -I/cygdrive/e/osg-osgearth-source/other_3rdParty/gdal-2.3.2/gnm -I/cygdrive/e/osg-osgearth-source/other_3rdParty/gdal-2.3.2/apps等。
/bin/sh /cygdrive/e/osg-osgearth-source/other_3rdParty/gdal-2.3.2/libtool --mode=compile --silent --tag=CXX D:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android28-clang++ -I/cygdrive/e/osg-osgearth-source/other_3rdParty/gdal-2.3.2/port -I/cygdrive/e/osg-osgearth-source/other_3rdParty/gdal-2.3.