osgearth地球嵌入QT窗口

一、环境配置

在QT里面使用osg和osgearth的难点主要在于环境配置,本人环境为:QT5.9.9+VS2017+OSG3.4.0+osgearth2.8

首先在VS里新建一个QT空项目,然后添加下面的源文件,配置osg和osgearth的环境,然后配置QT环境。关键在于QT Models里面核心模块的选择,选不对会报错

osgearth地球嵌入QT窗口_第1张图片

链接器-->附加依赖项填入这些:

glut32.lib
glut32d.lib
OpenThreads.lib
OpenThreadsd.lib
osg.lib
osgAnimation.lib
osgAnimationd.lib
osgd.lib
osgDB.lib
osgDBd.lib
osgFX.lib
osgFXd.lib
osgGA.lib
osgGAd.lib
osgManipulator.lib
osgManipulatord.lib
osgParticle.lib
osgParticled.lib
osgPresentation.lib
osgPresentationd.lib
osgQt.lib
osgQtd.lib
osgShadow.lib
osgShadowd.lib
osgSim.lib
osgSimd.lib
osgTerrain.lib
osgTerraind.lib
osgText.lib
osgTextd.lib
osgUI.lib
osgUId.lib
osgUtil.lib
osgUtild.lib
osgViewer.li

你可能感兴趣的:(osgearth,qt)