OpenSceneGraph3.5.1编译

网友投稿 297 2022-09-14

OpenSceneGraph3.5.1编译

OSG系列文章目录

文章目录

​​OSG系列文章目录​​​​前言​​​​一、使用cmake 编译osg3.5.1​​​​2.编译OpenSceneGraph.sln​​​​3. 生成lib和dll​​​​4.注意​​

前言

1.git(不是必须)使用git得到的[源码下载] 2.osg3.5.1源码(​​​osg3.5.1源码下载地址​​​)是3.5.1版本的 3.osg依赖的三方库3rdParty

上面一个是full,一个是small,随便选一个,我这里选的full

small和full最大区别:感觉full多了boost库4.osg依赖的数据:OpenSceneGraph-Data-3.4.0.zip

5.​​CMake下载​​​,我这里用的3.21.4版本 6.vs2019(VS017也可以) 我这里用的vs2019

一、使用cmake 编译osg3.5.1

cmake报错:

CMake Deprecation Warning at CMakeLists.txt:7 (CMAKE_MINIMUM_REQUIRED):

Compatibility with CMake < 2.8.12 will be removed from a future version of

CMake.

Update the VERSION argument value or use a … suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at CMakeLists.txt:38 (cmake_policy): The OLD behavior for policy CMP0008 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

CMake Deprecation Warning at CMakeLists.txt:45 (cmake_policy): The OLD behavior for policy CMP0020 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all

policies are deprecated and that a policy should be set to OLD only under

specific short-term circumstances. Projects should be ported to the NEW

behavior and not rely on setting a policy to OLD.

大概意思:

1.cmake最小版本需要2.8.12,否则有些特性将忽略

解决:打开OpenSceneGraph-OpenSceneGraph-3.5.1文件夹下的CMakeLists.txt

加入:cmake_minimum_required (VERSION 3.21.4)

2.缺少gdal_i.lib、gif.lib、libxml2.lib

下载OpenSceneGraph-Data-3.4.0.zip并解压到OpenSceneGraph-OpenSceneGraph-3.5.1同级目录

2.编译OpenSceneGraph.sln

3. 生成lib和dll

4.注意

在生成debug版本的时候,没有出错,但是在生成release版本的时候报错了:

解决方法

1.找到Plugins osg deprecated osgviewer工程

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:全媒派:视频新闻还能怎么升级?答案藏在一家纸媒里!
下一篇:分布式事务的应用场景
相关文章

 发表评论

暂时没有评论,来抢沙发吧~