GDAL使用mingw编译问题
编译的时候总是提示找不到头文件
在window下使用tdm-mingw编译64位的程序。
在cygwin下使用./configure --prefix=/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/build --with-libz=yes --with-libtiff=yes --with-geotiff=yes --with-jpeg=yes --enable-shared --enable-static --with-liblzma=yes --build=x86_64-w64-mingw32
生成makefile。让使用mingw32-make进行编译。然后就报下面的错误了
mingw32-make[1]: Entering directory 'D:/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/gcore' C:/TDM-GCC-64/bin/mingw32-make -C mdreader mingw32-make[2]: Entering directory 'D:/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/gcore/mdreader' C:/cygwin64/bin/sh.exe /cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/libtool --mode=compile --tag=CXX g++ -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/port -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/gcore -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/alg -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/ogr -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/ogr/ogrsf_frmts -g -O2 -Wall -DOGR_ENABLED -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/port -DGDAL_COMPILATION -c -o ../reader_digital_globe.lo reader_digital_globe.cpp libtool: compile: g++ -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/port -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/gcore -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/alg -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/ogr -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/ogr/ogrsf_frmts -g -O2 -Wall -DOGR_ENABLED -I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/port -DGDAL_COMPILATION -c reader_digital_globe.cpp -DDLL_EXPORT -DPIC -o ../.libs/reader_digital_globe.o In file included from reader_digital_globe.h:34:0, from reader_digital_globe.cpp:31: ../gdal_mdreader.h:35:22: fatal error: cpl_port.h: No such file or directory compilation terminated.
-I/cygdrive/d/development_library/GDAL/gdal-2.0.2-mingw64/gdal_2/gdal-2.0.2/port
可是还是找不到头文件,这是为什么呢?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
等我下周试试。谢谢啦
我也是同样的问题,按照这个方法又出现了以下问题 mingw32-make[1]: *** No rule to make target 'gcore/gdal? gdaldrivermanager.cpp -o gdaldrivermanager.lo', needed by 'libgdal.la'. Stop.