win7下編譯安裝osgearth

來源:互聯網
上載者:User

標籤:style   blog   http   color   使用   os   io   檔案   

文章摘要:本文記錄了在win7下,通過源碼,編譯,安裝osgearth的全部過程。環境說明:vs2010/cmake3.01/openscenegraph3.2/osgearth2.5

一、下載源碼

  1. 下載源碼包 https://github.com/gwaldron/osgearth/zipball/osgearth-2.5 
  2. 通過git下載 git clone https://github.com/gwaldron/osgearth.git (下載的是最新版)

二、環境準備

  1. 安裝依賴庫openscenegraph,版本>=3.01
  2. 安裝依賴庫gdal,版本>=1.6
  3. 安裝依賴庫CURL,此庫與openscenegraph一起安裝
  4. 其它可選的庫,根據需要選擇安裝; geos3.2/minizip/qt/leveldb/duktape

三、構建vs工程

  • 在源碼目錄下建立build檔案夾,用於out-of-source構建(推薦),將源碼與工程和編譯檔案分離,便於代碼的版本管理

  • 設定CURL/GDAL/OSG的庫引用檔案及標頭檔引用
  • configure—>generate

四、編譯&&安裝

  1. vs2010開啟OSGEARTH.sln,編譯INSTALL
  2. 根據錯誤提示修改/添加對osg/osgearth的相關的庫的引用依賴,如

  • 編譯安裝在,可在使用cmake構建時修改安裝目錄

五、驗證&&運行樣本

  1. 或將安裝目錄添加到使用者的環境變數path中,或開啟cmd命令列,進入到安裝目錄中,運行
     osgearth_versiond

     

    ,顯示結果如下
  2. 運行
    osgearth_viewerd "D:\code\osgearth-osgearth-2.5\osgearth-osgearth-2.5\tests\feature_geom.earth"

     

    ,結果

 

本文結束!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.