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. 如何恢复 Linux 上删除的文件,第 1 部分

    来源:http://www.ibm.com/developerworks/cn/linux/l-cn-filesrc/ 原理及普通文件的恢复 要想恢复误删除的文件,必须清楚数据在磁盘上究竟是如何存储的 ...

  2. The LMAX disruptor Architecture--转载

    原文地址: LMAX is a new retail financial trading platform. As a result it has to process many trades wit ...

  3. CSRF 攻击的应对之道--转

    http://www.ibm.com/developerworks/cn/web/1102_niugang_csrf/ 简介: CSRF(Cross Site Request Forgery, 跨站域 ...

  4. HTML5图片拖拽预览原理及实现

    一.前言 这两天恰好有一位同事问我怎样做一个图片预览功能.作为现代人的我们首先想到的当然是HTML5啦,其实HTML5做图片预览已经是一个老生常谈的问题了.我在这里就简单说说其中相关的一些东西,当然会 ...

  5. iOS获取设备型号

    导入头文件 #include <sys/types.h> #include <sys/sysctl.h> 直接调用 //获得设备型号 + (NSString *)getCurr ...

  6. ApplePay高调入华,教你在app里上线ApplePay

      ApplePay在中国上线后,就有许多线上app前后脚加入了对其的接入支持,个人比较喜欢的ENJOY也抢在首批接入了ApplePay应用内支付.本文将分享作者的接入经验. ApplePay是苹果公 ...

  7. 计算机网络中的TCP/UDP协议到底是怎么回事(二)

    上一篇博客阐述了TCP/IP五层网络结构模型以及一些关于TCP.UDP的基础知识,这篇博客会接着写一些关于TCP拥塞控制的算法以及对TCP中常有的疑问进行解答. TCP拥塞控制 首先了解几个概念,为下 ...

  8. Balloon Comes!

    Problem Description The contest starts now! How excited it is to see balloons floating around. You, ...

  9. solr英文使用的基本分词器和过滤器配置

    solr英文应用的基本分词器和过滤器配置 英文应用分词器和过滤器一般配置顺序 索引(index): 1:空格 WhitespaceTokenizer    2:过滤词(停用词,如:on.of.a.an ...

  10. iOS -动态可变参数

    #import "ViewController.h" @interface ViewController () @end @implementation ViewControlle ...