windows下GDAL及python接口编译过程注意事项

来源:互联网 发布:库存查询软件 编辑:程序博客网 时间:2024/05/21 10:06

Window下编译GDAL的方法在网上已经能搜到很多了,例如http://blog.csdn.net/zhoubl668/article/details/6641027

但是在实际操作中还是碰到些问题,现在把注意事项写下。(具体步骤参考上面链接。下面是一些注意事项):

1. 将命令

nmake /f makefile.vc   #编译

nmake /f makefile.vc install #安装运行需要的东西

nmake /f makefile.vc devinstall #安装开发需要的东西

统一改为

nmake /f makefile.vc MSVC_VER=1800 WIN64=yesnmake /f makefile.vc install MSVC_VER=1800 WIN64=yes    nmake /f makefile.vc devinstall MSVC_VER=1800 WIN64=yes 
注意上面命令中1800表示使用vs2013编译,其它vs版本对应的标识号可以从源码里的nmake.opt文件查到,win64=yes表示编译为64位


2. 因为要编译python包,因此需要安装 Microsoft Visual C++ Compiler for Python 2.7,可以从https://www.microsoft.com/en-us/download/confirmation.aspx?id=44266下载


3.  配置gdal的环境变量,默认是C:\warmerda\bld\bin

我编译的是gdal2.2.3,按照上述步骤顺利编译

原创粉丝点击