很早就关注QGIS了,关于它的编译,也尝试了好几次,但都没有成功。在要放弃的时候,再尝试了一回,完全按照他的intall指导。终于成功。

择其要点而言,就是要按部就班,不能偷工减料。想要成功编译,请按照以下步骤尝试。

4.1.3. Setting up the Visual Studio project with CMake

======================================================

To start a command prompt with an environment that both has the VC++ and the OSGeo4W variables create the following batch file (assuming the above packages were installed in the default locations):

@echo off

path %SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\System32\Wbem;%PROGRAMFILES%\CMake 2.8\bin;%PROGRAMFILES%\subversion\bin;%PROGRAMFILES%\GnuWin32\bin

set PYTHONPATH=

set VS90COMNTOOLS=%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\Tools\

call "%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86

set INCLUDE=%INCLUDE%;%PROGRAMFILES%\Microsoft Platform SDK for Windows Server 2003 R2\include

set LIB=%LIB%;%PROGRAMFILES%\Microsoft Platform SDK for Windows Server 2003 R2\lib

set OSGEO4W_ROOT=C:\OSGeo4W

call "%OSGEO4W_ROOT%\bin\o4w_env.bat"

@set GRASS_PREFIX=c:/OSGeo4W/apps/grass/grass-6.4.0

@set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include

@set LIB=%LIB%;%OSGEO4W_ROOT%\lib;%OSGEO4W_ROOT%\lib

@cmd

Start the batch file and on the command prompt checkout the QGIS source from git to the source directory Quantum-GIS:

git clone git://github.com/qgis/Quantum-GIS.git

Create a 'build' directory somewhere. This will be where all the build output will be generated.

Now run cmake-gui and in the Where is the source code: box, browse to the top level QGIS directory.

In the Where to build the binaries: box, browse to the 'build' directory you created.

Adjust the path to bison and flex so that the shortened C:/Progra~1 is used rather than C:/Program Files.

Verify that the 'BINDINGS_GLOBAL_INSTALL' option is not checked, so that python bindings are placed into the output directory when you run the INSTALL target.

Hit Configure to start the configuration and select Visual Studio 9 2008 and keep native compilers and click Finish.

The configuration should complete without any further questions and allow you to click Generate.

Now close cmake-gui and continue on the command prompt by starting vcexpress.  Use File / Open / Project/Solutions and open the qgis-x.y.z.sln File in your project directory.

Change Solution Configuration from Debug to RelWithDebInfo (Release with Debug Info)  or Release before you build QGIS using the ALL_BUILD target (otherwise you need debug libraries that are not included).

After the build completed you should install QGIS using the INSTALL target.

Install QGIS by building the INSTALL project. By default this will install to c:\Program Files\qgis<version> (this can be changed by changing the CMAKE_INSTALL_PREFIX variable in cmake-gui).

You will also either need to add all the dependency DLLs to the QGIS install directory or add their respective directories to your PATH.

上述文字请逐一阅读,不能有遗漏。

QGIS1.8.0的编译的更多相关文章

  1. hadoop-2.2.0 的编译安装及HA配置

    一 准备工作 准备工作中要求有 1.centOs 6.4,添加hadoop用户,配置集群内的/etc/hosts文件. 2.安装hadoop用户的ssh,并打通集群内所有机器,(ha执行fencing ...

  2. CAS 4.0.0RC编译环境

    CAS 4.0.0RC编译环境 Eclipse Java EE IDE for Web Developers. JDK1.7,注意用JDK1.8是会出现编译错误的. Maven 在编译出现test错误 ...

  3. Android 6.0 源代码编译实践

    http://www.judymax.com/archives/1087 Android 6.0 源代码编译实践 https://mirrors.tuna.tsinghua.edu.cn/help/A ...

  4. 在Ubuntu 64位OS上运行hadoop2.2.0[重新编译hadoop]

    最近在学习搭建Hadoop, 我们从Apache官方网站直接下载最新版本Hadoop2.2.官方目前是提供了linux32位系统可执行文件,结果运行时发现提示 “libhadoop.so.1.0.0 ...

  5. windows平台下VLC2.0.5编译

    windows平台下VLC2.0.5编译说明 时隔一年多,又要搞流媒体了,不过这次是要做流媒体服务器. 暂时决定使用vlc+ffmpeg+live555,虽然听有些前辈说这个组合的性能较差,只能作为学 ...

  6. 在CUDA8.0下编译安装OpenCV3.1.0来实现GPU加速(Compiling OpenCV3.1.0 with CUDA8.0 support)

    在CUDA8.0下编译安装OpenCV3.1.0 一.本人电脑配置:ubuntu 14.04, NVIDIA GTX1060. 二.编译OpenCV3.1.0前,读者需要成功安装CUDA8.0(网上有 ...

  7. Ubuntu16.04下iTop4412环境搭建+Android4.0.3编译

    系统:Ubuntu16.04.02(优麒麟) 安装库文件和JDK 使用cd 命令,进入解压出来的“Android_JDK” -->“jdk6”文件夹,运行脚本文件 “install-sun-ja ...

  8. Apollo-3.0本地编译

    Apollo-3.0本地编译 用docker编译所用的dev.x86_64.dockerfile文件(具体位置在apollo/docker/build)中有所有的依赖库或包, 还会执行一些shell脚 ...

  9. VS2015+OpenGL4.0开发编译时弹出错误:glaux.lib(tk.obj) : error LNK2019: 无法解析的外部符号 _sscanf,该符号在函数 _GetRegistrySysColors@8 中被引用

    一.问题描述: VS2015+OpenGL4.0开发编译时弹出如下所示的错误: 1>glaux.lib(tk.obj) : error LNK2019: 无法解析的外部符号 _sscanf,该符 ...

随机推荐

  1. html-webpack-plugin的使用

    使用前第一步:npm install 安装html-webpack-plugin --save--dev || --save  (tips:--save--dev跟--save最大的区别就是--dev ...

  2. css设置黑体宋体等(转)

    代码如下: .selector{ font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STH ...

  3. Oracle创建表空间、用户、分配权限语句

    --创建表空间 create tablespace 表空间名字 logging datafile 'E:\app\sinohuarui\oradata\orcl\文件名.dbf' size 50m a ...

  4. 动态加载js css 插件

    简介 动态加载js,css在现在以及将来肯定是很重要的.目前来看前端代码编写的业务量已经远远超过后端编写的.随着对用户体验度逐渐增强,前端业务复杂,加载速度变得很慢很慢.为了解决这个问题,目前出现的两 ...

  5. 设计模式的征途—7.适配器(Adapter)模式

    在现实生活中,我们的笔记本电脑的工作电压大多数都是20V,而我国的家庭用电是220V,如何让20V的笔记本电脑能够工作在220V的电压下工作?答案:引入一个电源适配器,俗称变压器,有了这个电源适配器, ...

  6. 前端面试题系列(1):doctype作用 标准模式与兼容模式

    1.doctype作用 <!DOCTYPE>声明位于HTML文档的第一行.处于<HTML>标签之前.告知浏览器的解析器用什么文档标准解析这个文档.DOCYTYPE不存在或格式不 ...

  7. Python的__main__.py用法

    [背景] 在看flower的时候看到__main__.py文件,不知道具体做什么用? 故先进行测试看看. [测试代码] 测试代码目录结构如下: . `-- test |-- __init__.py | ...

  8. 深度学习的异构加速技术(一):AI 需要一个多大的“心脏”?

    欢迎大家前往腾讯云社区,获取更多腾讯海量技术实践干货哦~ 作者:kevinxiaoyu,高级研究员,隶属腾讯TEG-架构平台部,主要研究方向为深度学习异构计算与硬件加速.FPGA云.高速视觉感知等方向 ...

  9. 【玩转树莓派】使用 sinopia 搭建私有 npm 服务器

    简介 使用 sinopia 的好处是,node系的工程师,内部协作时,使用自有 npm 包,会非常方便:另外,sinopia,会缓存已经下载过的包,可以在相当程度上,加速 npm install 相关 ...

  10. hive Beeline plus HiveServer2简单使用

    HiveServer2是经常与beeline一起使用,可以用jdbc客户端远程连接,一般用于生产环境. 在提供传统客服端的功能之外,还提供其他功能: Beeline连接 1.先在hadoop集群启动H ...