QGIS1.7.1 version Compilation

Source: Internet
Author: User
Tags bz2 goto

QGIS1.7.1 compilation

(Dedicate this article only to the giser that likes to debug Qgis)

Compile Qgis start

Reference Documentation: {

Http://download.osgeo.org/qgis/doc/manual/qgis-1.6.0_coding-compilation_guide_en.pdf}

Reference URL: {Http://www.qgis.org/wiki/Building_QGIS_from_Source}

Compilation environment: windowsxp,vs2008, Qt4.5.0

1. Download software;

Download GNUW: Install to C:\GnuWin32

{

Microsoft Windows server®2003 R2 Platform sdk:http://download.microsoft.com/download/f/a/d/ Fad9efde-8627-4e7a-8812-c351ba099151/psdk-x86.exe

flex:http://gnuwin32.sourceforge.net/downlinks/flex.php

bison:http://gnuwin32.sourceforge.net/downlinks/bison.php

Note: copy: gnuwin32/include/unistd.h to vs2008 installation directory. /vc/include

}

Download and install osgeo4w, install to C:\OSGeo4W

{

Osgeo4w:http://download.osgeo.org/osgeo4w/osgeo4w-setup.exe

Choose to install the following lib:

Expat

fcgi

Gdal17

Grass

Gsl-devel

Iconv

Pyqt4

Qt4-devel

Qwt5-devel-qt4

Sip

}

Download and install CMake;

{

Cmake:http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe

}

Download install qt (qt-win-opensource-4.5.0-vs2008.exe)

2. Download Qgis code; qgis1.6.0 and qgis1.7.1 have been compiled by:

http://qgis.org/downloads/qgis-1.6.0.tar.bz2

http://qgis.org/downloads/qgis-1.7.1.tar.bz2

3. Point to Code, set below

Create a Build folder in the source folder

PostgreSQL library file specifies the Libpq.lib file under Lib in osgeo4w


Http://sourceforge.net/projects/win32svn/les/1.6.13/setup-subversion-1.6.13msi/download

4. Deal with: qgis1.6.0 version needs to be processed;

An error occurs when the Qgssearchstringparser.cpp file is generated using Bison.exe, with the following error message:

c:\gnuwin32\bin\bison.exe-od:/qgis1.6.0/build/src/core/qgssearchstringparser.cpp-d-v-t D:/QGIS1.6.0/src/core/ Qgssearchstringparser.yy

if errorlevel 1 goto vcreporterror

Goto Vcend

: Vcreporterror

echo project:error prj0019:a tool returned an error code from "Generating Qgssearchstringparser.cpp"

Exit 1

Therefore, you must generate the file manually, in a DOS environment, into the directory where the Bison.exe file resides, and execute the following command:

C:\>CD GnuWin32

C:\GNUWIN32>CD bin

C:\gnuwin32\bin>bison.exe-o d:/qgis1.6.0/build/src/core/qgssearchstringparser.cpp-d-v-t D:/QGIS1.6.0/src/core /qgssearchstringparser.yy

Here d:/qgis1.6.0 refers to the Ggis source directory, d:/qgis1.6.0/build refers to the CMake generated VC project files in the directory, The above command means to use QGSSEARCHSTRINGPARSER.YY to generate qgssearchstringparser.cpp files in the directory where the VC project files are located.

For Qgis_core Engineering, manual generation of qgssearchstringparser.cpp is required, as follows

c:/gnuwin32/bin/bison.exe-od:/qgis1.6.0/build/src/core/qgssearchstringparser.cpp-d-v-t D:/QGIS1.6.0/src/core/ Qgssearchstringparser.yy

For Qgis_analysis Engineering, manual generation of qgsrastercalcparser.cpp is required, as follows

C:/gnuwin32/bin/bison.exe-p raster-od:/qgis1.6.0/build/src/analysis/qgsrastercalcparser.cpp-d-v-t D:/QGIS1.6.0/ Src/analysis/raster/qgsrastercalcparser.yy

Compiling the qgis1.7.1 version does not require this step processing.

5. Start compilation and run successfully. Just press the 2 F7. (After testing, qgis1.7.1 version for a stable version, the source code take care of the coding.pdf and install.pdf files, for the Qgis two development, can be described as the perfect treasure)

It is recommended to use debug to compile Lib library, which is convenient for later case application debugging; (I used to have an error with Lib and DLL in relwithdebinfo format Qwidget:must construct a qapplication before a Qpaintdevice, set debug compile, copy the corresponding library to the corresponding folder, problem solving)

6. Test cases, Reference link 6, which contains settings and debugging operation;

7. Enjoy it.

8. Issues that may arise:

A python problem, it is recommended to choose Python in osgeo4w, do not recommend the use of ArcGIS and other software provided by the Python;

b after QT installation, set the environment variable Qtdir and point to the appropriate location and add it to the path (%qtdir%;%qtdir%\bin), add GnuWin32 to Path (C:\GnuWin32\bin;), and so on

(c) Other issues, such as the inability of the application to start normally (0xc0150002) solution to the reference online solution;

9. Reference Connection

A) reference compilation: Http://blog.sina.com.cn/s/blog_62cd89530100t9um.html

b) Reference compilation: http://blog.csdn.net/ryanzll/article/details/6217142

c) Reference compilation: Http://www.cnblogs.com/ajeyone/archive/2011/05/12/2044680.html

d) Compilation problem: http://lzchenheng.blog.163.com/blog/static/838335362011274940450/

(e) Model procedures: http://download.csdn.net/detail/lzchenheng/3356813

f) Qgis Two development introduction:

http://lzchenheng.blog.163.com/blog/static/838335362011214103147804/

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.