Runtime Enviroment:Open SUSE Linux *i385

Notice:if any command disavliable ,you can copy the parameters in to the terminal then press enter to continue your configure.

1、 Download the package :GDAL-1.9.2.tar.zg and PROJ-4.7.0.tar.zg in the following URL:

URL: http://download.osgeo.org/gdal/

URL: http://download.osgeo.org/proj/

2、 安装GDAL-1.9.2库,命令如下:

% cd gdal

% ./configure

% make

% su

Password: ********

% make install

% exit

安装成功后,会在/usr/local/include文件夹中产生一系列.h文件(cpl_config.h、gdal.h……),在/usr/local/lib文件夹中产生5个库文件,其中libgdal.a和libgdal.la为静态链接库,libgdal.so, libgdal.so.1, libgdal.so.1.13.2为动态链接库。

3、 安装PROJ-4.7.0库,命令如下:

% cd proj

% ./configure

% make

% su

Password: ********

% make install

% exit

安装成功后,会在/usr/local/include文件夹中产生4个.h文件(nad_list.h,

org_proj4_Projections.h,proj_api.h,projects.h),在/usr/local/lib文件夹中产生5个库文件,其中libproj.a和libproj.la为静态链接库,libproj.so, libproj.so.0, libproj.so.0.6.6为动态链接库。

4、 将/usr/local/lib添加到环境变量中,命令如下:

cd /etc/ld.so.conf.d

touch local.conf

vi local.conf

i

/usr/local/lib

Esc

Wq

Ldconfig -v

5、 将/usr/local/include文件夹copy到当前工程(test)目录下。

6、 test.cpp里面加载必要的头文件就可以使用GDAL和PROJ里面的函数:

#include "./include/gdal.h"

#include "./include/gdal_alg.h"

#include "./include/cpl_conv.h"

#include "./include/cpl_port.h"

#include "./include/cpl_multiproc.h"

#include "./include/ogr_srs_api.h"

#include "./include/proj_api.h"

7、 input the following command line to debug test.cpp:

g++ test.cpp –lgdal –lproj –o TEST

./TEST

8、The end.

Install GDAL in OpenSUSE 12.3 Linux的更多相关文章

  1. linux pip install gdal apyt-get install libgdal-dev export cplus_path=/usr/include/gdal export c_path=/usr/include/gdal

    apt-get install libgdal-dev pip install gdal

  2. 12个 Linux 中 grep 命令的超级用法实例

    12个 Linux 中 grep 命令的超级用法实例 你是否遇到过需要在文件中查找一个特定的字符串或者样式,但是不知道从哪儿开始?那么,就请grep来帮你吧. grep是每个Linux发行版都预装的一 ...

  3. 12个Linux进程管理命令介绍(转)

    12个Linux进程管理命令介绍 [日期:2015-06-02] 来源:Linux中国  作者:Linux [字体:大 中 小]   执行中的程序在称作进程.当程序以可执行文件存放在存储中,并且运行的 ...

  4. Install pyodbc in OpenSUSE

    Install pyodbc in OpenSUSE: Install unixODBC-2.3.2 ./configure --prefix=/usr/local/unixODBC --enable ...

  5. How to install JDK (Java Development Kit) on Linux

    This tutorial will guide you on how to install JDK (Java Development Kit) on Linux. Since I use Cent ...

  6. 玩转12款Linux开源机器人

    玩转12款Linux开源机器人 头条网2016-02-15 09:04 3DR Solo智能无人机发布于2015年中期.作为试图与大疆广受欢迎的Phantom系列无人机相抗衡的产品,它的双处理器运行L ...

  7. 实用推荐:12款Linux系统恢复工具

    12款Linux系统恢复工具 电脑死机,系统崩溃,总会给电脑使用者带来一定的损失.你是否不小心删除你的纪念图片?安装新系统时候,擦除了分区表?无法读取旧CD里面的数据?别急嘛-我们将会给您推荐一些免费 ...

  8. ./configure && make && make install 编译安装和卸载 (Linux)

    ./configure && make && make install 编译安装和卸载 (Linux) 正常的编译安装/卸载:   源码的安装一般由3个步骤组成:配置( ...

  9. oracle 12.2 linux/solaris正式发布

    oracle 12.2 linux/solaris正式发布,可以从http://www.oracle.com/technetwork/database/enterprise-edition/downl ...

随机推荐

  1. boost.asio源码剖析(四) ---- asio中的泛型概念(concepts)

    * Protocol(通信协议) Protocol,是asio在网络编程方面最重要的一个concept.在第一章中的levelX类图中可以看到,所有提供网络相关功能的服务和I/O对象都需要Protoc ...

  2. MVC4数据注释与验证

    Using Validation Annotations Required必须项验证属性 [Required] public string FirstName { get; set; } [Requi ...

  3. vm.dirty_background_ratio and vm.dirty_ratio

    http://hellojava.info/?p=264&utm_source=tuicool&utm_medium=referral 解决磁盘io紧张的一种临时方法 有些时候可能会碰 ...

  4. HTTP Referer二三事---转

    授权方式:署名,非商业用途,保持一致,转载时请务必以超链接(http://www.fwolf.com/blog/post/320)的形式标明文章原始出处和作者信息及本声明. 什么是HTTP Refer ...

  5. Data Structure 之 KMC字符串匹配算法

    有关模式函数值next[i]确实有很多版本啊,在另外一些面向对象的算法描述书中也有失效函数 f(j)的说法,其实是一个意思,即next[j]=f(j-1)+1,不过还是next[j]这种表示法好理解啊 ...

  6. leetcode 题解: Length of Last Word

    leetcode: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', re ...

  7. epoll实现linux进程通信

    server.c #include <stdio.h> #include <stdlib.h> #include <string.h> #include <s ...

  8. iOS - 网络 - NSURLSession

    1.NSURLSession基础 NSURLConnection在开发中会使用的越来越少,iOS9已经将NSURLConnection废弃,现在最低版本一般适配iOS,所以也可以使用.NSURLCon ...

  9. 《算法导论》习题解答 Chapter 22.1-4(去除重边)

    思路:重开一个新图,按着邻接列表的顺序从上到下遍历,每遍历一行链表前,清空visited数组,如果没有访问过这个元素,则加入新图,如果已经访问过了(重边),则不动. 伪代码: 复杂度:O(V+E) f ...

  10. css初接触

    一.简介:CSS 即 级联样式表 . 它是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言. css是能够真正做到网页表现与内容分离的一种 ...