Gdal Installation Configuration (Memo)

Source: Internet
Author: User
Tags visual studio

1. Download Gdal191.zip 2 from http://download.osgeo.org/gdal/ , compile with cmd command line

Using cmd command-line compilation, first in the "Start menu \ All Programs \microsoft Visual Studio 2008\visual Studio tools\ Visual Studio 2008 Command Prompt", click "Visual Studio 2008 The command prompt will pop up the following interface:

Then use the CD command to switch to the Gdal source directory, as shown in the following figure:


After switching to the source code directory of the Gdal, enter the command line below and wait until the compilation is finished.

Nmake-f MAKEFILE.VC

Nmake-f MAKEFILE.VC Install

Nmake-f MAKEFILE.VC Devinstall

There are also other commands, such as:

Nmake-f MAKEFILE.VC Clean

Nmake-f MAKEFILE.VC Msvc_ver=1400clean

Nmake-f MAKEFILE.VC msvc_ver=1400debug=1

The command meaning of the above six lines is in turn:

Compiling the Gdal library

Compile the Gdal library and install it (this means to copy the generated Dll,exe and other files to the C:\warmerda\bld directory).

Compile the Gdal library and install the developer mode (the installation means that the developer mode means to copy the header and Lib files from the development include folder to the C:\warmerda\bld directory, which will be in C:\warmerda\ BLD directory of more than two folders, respectively, include and Lib, respectively, is the gdal of the header and Lib files, used to call the Gdal library use).

Cleans up the Gdal library and removes the temporary files generated by the compiled Gdal Library, which acts as a cleanup command in the VS environment.

function as above, but added a msvc_ver=1400, which means compile with VS2005, msvc_ver=1500, means use VS2008 compile, msvc_ver=1600, means use VS2010 compile.

Compile Gdal library debug mode, can be used to debug Gdal source code.

3. In the Vs2008 menu, in Tool Option, add gdal include and Lib folder directories to the Library files and include files respectively

4, new project, copy the Gdal19.dll file to the project directory, and add Gdal_i.lib in Project setting

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.