OSGEarth环境搭建
1.下载OsgEaarth2.8源码
https://codeload.github.com/gwaldron/osgearth/legacy.zip/osgearth-2.8
2.下载perl
编译CURL需要perl
http://downloads.activestate.com/ActivePerl/releases/5.24.1.2402/ActivePerl-5.24.1.2402-MSWin32-x64-401627.exe
3.下载CURL源码
https://codeload.github.com/bingxueyouwu/curl/zip/master
4.下载ZLIB源码
http://124.205.69.163/files/523900000520E796/www.zlib.net/zlib-1.2.11.tar.gz
5.下载GDAL源码
http://124.205.69.132/files/9063000005336BEB/download.osgeo.org/gdal/2.1.3/gdal213.zip
编译GDAL,打开“VS2015 开发人员命令提示",
进入GDAL-2.1.3的目录,
编译32位版本命令
nmake /f makefile.vc
nmake /f makefile.vc install
nmake /f makefile.vc devinstall
编译64位版本命令
nmake /f makefile.vc MSVC_VER=1900 WIN64=YES
nmake /f makefile.vc install MSVC_VER=1900 WIN64=YES
nmake /f makefile.vc devinstall MSVC_VER=1900 WIN64=YES
其中 MSVC_VER 和VS版本关系如下
# nmake -f makefile.vc MSVC_VER=xxxx
# where xxxx is one of following:
# 1900 = 14.0(2015)
# 1800 = 12.0(2013)
# 1700 = 11.0(2012)
# 1600 = 10.0(2010)
# 1500 = 9.0 (2008)
# 1400 = 8.0 (2005)
# 1310 = 7.1 (2003)
# 1300 = 7.0 (2002)
# 1200 = 6.0
可参考 http://www.cnblogs.com/geospatial/p/5634033.html
编译geos
>VCVARS32.BAT
>cd d:\geos350
>atuogen.bat
>nmake /f makefile.vc
geos编译出现错误时参考 http://blog.sina.com.cn/s/blog_48ff6e140102x7gg.html
http://blog.csdn.net/csxiaoshui/article/details/51800955
osgearth 暂不支持geos 3.6.1 详见,请使用3.5.1及以前版本
5.下载protobuf
https://github.com/google/protobuf
编译protobuf
https://github.com/google/protobuf/blob/master/cmake/README.md
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=../../../install ../..
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=../../../install ../..
Compiling nmake
Install nmake install
编译OSGEarth中出现的问题:
1.OSGEarth/QuadTree.h中 找不到META_Shape这个预定义方法,进而产生一系列的错误
解决过程:首先,这QuadTree.h这个文件中看到有<osg/Shape>和<osg/Geometry>两个引用,推断META_Shape这个预定义方法有可能定义在OSG中。
接着在OPENSCENEGRAPH工程搜索META_Shape,果然在<osg/KdTree>中发现了这个预定义方法,心想是不是OSGEarth工程的引用目录中
没有添加OSG_INCLUE_PATH,添加之后,依然报错。再次检查了QuadTree.h的引用头文件和命名空间,发现引用命名空间中没有osg,怀疑是
未引命名空间导致项目找不到KdTree这个头文件,依此思中,在QuadTree.h和QuadTree.cpp中添加 【 using namespace osg; 】后,错
误消失。
2.提示找不到这个 osg::Referenced::setThreadSafeReferenceCounting 成员方法
解决过程:这个问题相对简单一些,这个方法已经被移除掉了,可参见giuhub上的回答。
最新文章
- Linux下查看nginx安装目录
- 用VMware 11.0虚拟机安装Win8 系统失败,提示“shsucdx can&#39;t install”
- Nginx基础知识之————日志管理
- Linux shell用法和技巧(转)
- 【重走Android之路】【番外篇】关于==和equals
- hive部署手册
- windows系统 安装MongoDB 32位
- WCF Service端Inspector
- Eclipse图标含义
- js基础参数获取
- DYNAMICRESOLUTION | NODYNAMICRESOLUTION
- unittest模块的常用方法:
- python入门(十一):异常
- .Net Core新建解决方案,添加项目引用,使用VSCode调试
- C#设计模式(13)——享元模式
- gentoo freemind 安装设置
- linux指令统计日志出现的次数
- [Web 前端] 如何在React中做Ajax 请求?
- Android之设计模式
- 《JAVA与模式》之模板方法模式
热门文章
- error: openssl/md5.h: No such file or directory
- 利用WPF建立自己的3d gis软件(非axhost方式)(六)跳转,增加外部三维模型
- BeforeFieldInit的小叙
- document.addEventListener的使用介绍
- Bit error testing and training in double data rate (ddr) memory system
- CMake 添加头文件目录,链接动态、静态库(添加子文件夹)
- java 多线程以及线程池
- 简明Python3教程 4.安装
- 编程算法 - 旋转矩阵 代码(C)
- Gradle离线配置