Ubuntu16.04系统下安装osg3.7+osgearth3.3
在Ubuntu 16.04系统下安装OSG 3.7和OSGEarth 3.3,你可以按照以下步骤操作:
- 更新系统包索引并升级系统:
sudo apt-update
sudo apt-upgrade
- 安装依赖库:
sudo apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev libcppunit-dev libboost-thread-dev libboost-filesystem-dev doxygen
- 安装CMake:
sudo apt-get install cmake
- 安装GDAL(如果OSGEarth依赖于它):
sudo apt-get install libgdal-dev
- 下载OSG和OSGEarth源代码:
wget https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.7.0.zip
unzip OpenSceneGraph-3.7.0.zip
cd OpenSceneGraph-OpenSceneGraph-3.7.0
wget https://github.com/gwaldron/osgearth/archive/v3.3.0.tar.gz
tar -xvf v3.3.0.tar.gz
cd osgearth-3.3.0
- 编译和安装OSG和OSGEarth:
# Compile and install OSG
cd OpenSceneGraph-OpenSceneGraph-3.7.0
mkdir build
cd build
cmake ..
make
sudo make install
# Compile and install OSGEarth
cd ../../osgearth-3.3.0
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
sudo make install
请确保你有足够的权限来执行这些命令,并且在编译过程中没有遇到任何错误。如果遇到问题,请检查OpenSceneGraph和osgearth的官方文档,以确保所有的依赖项都已正确安装。
评论已关闭