Win7 (32/64) VS2010 Configuration compilation Gdal Environment (graphic tutorial + Pro Test available!)

Source: Internet
Author: User

A recent VS2010 project used the Gdal, about gdal This library description and praise, here is not to repeat, the following is the detailed process of configuring Gdal in VS2010.

System description

Win7 (32-bit/64-bit), Vs2010,gdal 1.10.1 (as of the latest version of this article), before doing the following, make sure that you have installed the VS2010 correctly, as follows:

1. Download Gdal

Click on the official download page of Gdal, choose a different version according to your needs, according to the previous version of GDAL1.9.1 0 before testing can be compiled according to the method of this article successful. After the download is done, unzip to a root directory, because the subsequent operation will be more convenient, the address extracted from this article is

D:\gdal-1.10.1

If your decompression address is different from this article, you can make changes according to the actual situation.

2. Executive Vcvars32.bat

Run cmd as Administrator, (you can search for cmd in the Start menu, then right-click to run as Administrator, or you can find Cmd.exe under C:\windows\system32. Right click to run as Administrator).

Then switch to VS2010 's installation directory in CMD, for example in this article

C:\program Files\Microsoft Visual Studio 10.0\vc\bin

Execute Vcvars32.bat,

3. Compiling gdal

Switch directories in CMD to

D:\gdal-1.10.1

Directory, run the following command

nmake/f MAKEFILE.VC

The compilation process may take several minutes, depending on the configuration of the system,

4. Set the output directory

Locate the nmake.opt file in the download directory, for example, the file path in this article is:

D:\gdal-1.10.1\nmake.opt

Use a text editor (it is recommended to use a modern text editor such as notepad++) to open the Modify Gdal_home value for the installation directory. The directories used in this article are as follows:

Gdal_home = "D:\GDAL"

5. Installing Gdal

Back to the CMD interface, switch to the Extract directory (this is D:\gdal-1.10.1), execute the following two commands:

nmake/f makefile.vc installnmake/f makefile.vc devinstall

:

Perform nmake/f makefile.vc install first

Re-execute nmake/f makefile.vc devinstall

Wait for a period of time, gdal even if the actual compilation completed, this time to open the installation directory set in step 4, the need for something on the inside, there are bin,data,html,lib,include several folders. :

After the installation is completed, you need to configure Gdal in the VS2010 project, in the following way: VS2010 project configuration introduced Gdal

6. Other methods

Under Windows, cmd navigates to the Gdal directory, runs Makegdal_gen.bat build. vcproj, then opens the build, and under Linux, Terminal navigates to the Gdal directory, runs./configure, and then runs the Make command. , if necessary, run sudo make install. From @hao, can also be tested under.

Original address: http://www.malagis.com/win7-vs2010-gdal.html

Win7 (32/64) VS2010 Configuration compilation Gdal Environment (graphic tutorial + Pro Test available!)

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.