编译GDAL步骤(64位)

来源:互联网 发布:轩辕剑坐骑10进阶数据 编辑:程序博客网 时间:2024/04/30 01:29

 

I managed to build x64 version of GDAL under Visual Studio 2012 using steps from http://dominoc925.blogspot.ru/2013/03/build-64-bit-gdal-for-windows.html:

  1. Download gdal-1.9.2.tar.gz (or other version of sources) from http://download.osgeo.org/gdal/
  2. Unpack to some directory, e.g. C:\tmp\gdal-1.9.2\

    If you tried to build GDAL previously (e.g. x86), make sure that the build directory (C:\warmerda\bld\) and the source directory are clean from previous build attempt. If unsure, try to unpack sources in a new directory.

  3. Start VS2012 x64 Native Tools Command Prompt: Start -> All Programs -> Microsoft Visual Studio 2012 -> Visual Studio Tools -> Open VS2012 x64 Native Tools Command Prompt

    Or run %comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" amd64).

  4. Change directory to the directory with unpacked GDAL sources:

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>cd /D C:\tmp\gdal-1.9.2D:\trn4\gdal-1.9.2>
  5. Build GDAL with development files:

    nmake /f makefile.vc MSVC_VER=1700 WIN64=YESnmake /f makefile.vc MSVC_VER=1700 WIN64=YES installnmake /f makefile.vc MSVC_VER=1700 WIN64=YES devinstall

You can get your MSVC_VER number from here. GDAL will be built and installed to C:\warmerda\bld\.

0 0