1、下载三个软件的源代码(去各自官网下载即可)
2、将PROJ4和GEOS的源码放到GDAL目录下的supportlibs文件夹中。
3、修改GDAL的nmake.opt文件,部分内容如下:
# Uncomment for GEOS support (GEOS >= 3.1.0 required)GEOS_DIR=E:\code\gdal-1.11.3\supportlibs\geos-3.4.2GEOS_CFLAGS = -I$(GEOS_DIR)/capi -I$(GEOS_DIR)/include -DHAVE_GEOSGEOS_LIB = $(GEOS_DIR)/src/geos_c_i.lib# PROJ.4 stuff# Uncomment the following lines to link PROJ.4 library statically. Otherwise# it will be linked dynamically during runtime.PROJ_FLAGS = -DPROJ_STATICPROJ_INCLUDE = -IE:\code\gdal-1.11.3\supportlibs\proj.4\srcPROJ_LIBRARY = E:\code\gdal-1.11.3\supportlibs\proj.4\src\proj_i.lib
4、同时参考我上一篇文章,注意GEOS和PROJ4的nmake.opt文件的修改。
5、最后,打开“Visual Studio x64 Win64 命令提示(2010)”,逐条使用以下命令进行编译。
vcvars64.batE:cd E:\code\gdal-1.11.3\supportlibs\geos-3.4.2 nmake /f makefile.vc MSVC_VER=1600 release=1 cd E:\code\gdal-1.11.3\supportlibs\proj.4 nmake /f makefile.vc MSVC_VER=1600 release=1 cd .. cd .. nmake /f makefile.vc MSVC_VER=1600 release=1 nmake /f makefile.vc MSVC_VER=1600 release=1 devinstall