GDAL2.0 Compilation--32-bit and 64-bit

Source: Internet
Author: User

preparatory work:

SOURCE download, download the corresponding Gdal version here

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

Lazy compile can also download the corresponding version here

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

http://www.gisinternals.com/release.php

Compile process:

Taking VS2012 as an example

Win32

1, open VS2012 x86 native tool command prompt; Start Menu->microsoft Visual Studio 2012->visual Studio tools->vs2012 x86 native Tools command Prompt

2. Set to Gdal resource directory by CD command line command

3. After setting to the Gdal directory, type the following command line

      
nmake/f MAKEFILE.VC
    nmake/f MAKEFILE.VC Install    
nmake/f MAKEFILE.VC Devinstall
      The version file is then generated under C:\warmerda.
X64

64-bit version, Ink:error LNK2001 link error appears.

The following should be noted:

1, open VS2012 x64 compatible tool command prompt; Start Menu->microsoft Visual Studio 2012->visual Studio tools->vs2012 x64 Compatibility tool command Prompt

2. After setting to the Gdal directory, add msvc_ver=1700 WIN64 = YES after the command line to type the following command

      nmake/f makefile.vc Install msvc_ver=1700 Win64=yes
nmake/f makefile.vc Devinstall msvc_ver=1700 win64=yes
   
where Msvc_ver and VS versions are related

# 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

Reference: Https://trac.osgeo.org/gdal/wiki/BuildingOnWindows

GDAL2.0 Compilation--32-bit and 64-bit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.