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. 【OC语法快览】四、基础内存管理

    Basic Memory Management                                                           基础内存管理 If you're w ...

  2. WCF摘记

    //绑定形式 NetTcpBinding bind = new NetTcpBinding(); //地址 EndpointAddress address = new EndpointAddress( ...

  3. C# 网络通信大小端转换类

    本篇文章主要介绍了"C# 网络通信大小端转换类" using System;namespace Framework.NetPackage.Common { /// <summ ...

  4. Java再学习——Executor,ExecutorService,ScheduledExecutorService与Executors

    1,Executor.ExecutorService和ScheduledExecutorService,它们都是接口,它们的关系是ScheduledExecutorService继承ExecutorS ...

  5. SQL 必知必会-- 第17课:创建和操作表

    我这里用的是oracle 10g,PL/SQL来做的. 第17课  创建和操纵表  14517.1  创建表  14517.2  更新表  15017.3  删除表  15317.4  重命名表  1 ...

  6. java如何判断字符串是否为空的方法

    以下是java 判断字符串是否为空的四种方法: 方法一: 最多人使用的一个方法, 直观, 方便, 但效率很低: if(s == null ||"".equals(s)); 方法二: ...

  7. Linux重定向的理解

    /* 重定向的实例 dup2函数 利用filefd来代替STDOUT(标准输出流),write写入filefd的数据,重定向写出到STDOUT中: */ #include <stdio.h> ...

  8. UICollectionView 简单应用和实际操作

    1.网格视图   UICollectionView      网格布局 UICollectionViewFlowLayout系统图自带网格布局 系统自带的网格布局 UICollectionViewFl ...

  9. vb.net详解MDI窗体操作方法

    MDI窗体可以避免打开窗体的时候被无数个子窗体困扰,我将为大家一一的介绍一下vb.net中MDI窗体的操作方法 一.如何创建MDI窗体? 1.创建mdi主窗体 新建建立一个默认空白的Windows应用 ...

  10. 使你的 Google Summer of Code 建议被接收的5个技巧

    本文翻译自:http://www.di.ens.fr/~baghdadi/TXT_blog/5_advices_to_get_your_proposal_accepted.lyx.html 本文讲的主 ...