• GDAL2.0编译——32位和64位


    准备工作:

    Source下载,这里下载对应的GDAL版本

      https://trac.osgeo.org/gdal/wiki/DownloadSource

    懒得编译也可以在这里下载对应版本

      https://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries

      http://www.gisinternals.com/release.php 下载地址

    编译过程:

    VS2012为例

     Win32

      1、打开 VS2012 x86 本机工具命令提示; 开始菜单->Microsoft Visual Studio 2012->Visual Studio Tools->VS2012 x86 本机工具命令提示

      2、通过cd 命令行命令 设置到GDAL资源目录

      3、设置到GDAL目录后,以此键入如下命令行

          
         nmake /f makefile.vc
        nmake /f makefile.vc install    
         nmake /f makefile.vc devinstall
          然后C:warmerda下会生成版本文件。

     

     X64

      64位版本,会出现INK : error LNK2001链接错误。

      需注意如下:

      1、打开 VS2012 x64 兼容工具命令提示; 开始菜单->Microsoft Visual Studio 2012->Visual Studio Tools->VS2012 x64 兼容工具命令提示

      2、设置到GDAL目录后,命令行后加入 MSVC_VER=1700 WIN64=YES,以此键入如下命令

         nmake /f makefile.vc MSVC_VER=1700 WIN64=YES 
          nmake /f makefile.vc install MSVC_VER=1700 WIN64=YES
         nmake /f makefile.vc devinstall MSVC_VER=1700 WIN64=YES
       
        其中 MSVC_VER 和VS版本关系如下

        # nmake -f makefile.vc MSVC_VER=xxxx
        # where xxxx is one of following:
        # 1900 = 14.0(2015)
        # 1800 = 12.0(2013)
        # 1700 = 11.0(2012)
        # 1600 = 10.0(2010)
        # 1500 = 9.0 (2008)
        # 1400 = 8.0 (2005) 
        # 1310 = 7.1 (2003)
        # 1300 = 7.0 (2002)
        # 1200 = 6.0

    参考:https://trac.osgeo.org/gdal/wiki/BuildingOnWindows

  • 相关阅读:
    Linux初级知识_04 -- 目录结构与目录管理
    查找无限整数序列的第n位1,2,3,4,5,6,7,8,9,10,11,...
    谷歌面试题:在半径为1的圆中随机选取一点
    FtpClient 调用storeFile 抛出 java.net.SocketException异常
    CountDownLatch 使用
    软件版本号比较 java工具类
    pcm文件转wav C语言
    unimrcp更改安装目录
    xpath学习记录
    jackson 实体转json 为NULL或者为空不参加序列化
  • 原文地址:https://www.cnblogs.com/geospatial/p/5634033.html
Copyright © 2020-2023  润新知