osg OpenSceneGraph Could not find plugin to read objects fro
来源:http://www.tudoupe.com时间:2022-06-13
osg系列文章目录
文章目录
- osg系列文章目录
- 前言
- 一、问题定位
- 二、解决
- 1.修改系统环境变量
- 2.在每个osg项目中配置了osg头文件lib和 dll的插件
前言
当运行VS2019OSG项目时,模型和纹理窗口的字体文件通常可以在前一天阅读,但不是今天
Error reading file C:WindowsFontsarial.ttf: read error (Could not find plugin to read objects from file “C:WindowsFontsarial.ttf”.)
Error writing file Text.osg: write error (Could not find plugin to write nodes to file “Text.osg”.)
Failed in osgDB::writeNodeFile().
Successfully wrote “Text.osg”. Execute " osgviewer Text.osg" to view.
void StateSet::setGlobalDefaults() ShaderPipeline disabled.
Error reading file Text.osg: read error (Could not find plugin to read objects from file “Text.osg”.)
请按任何键继续。

一、问题定位
首先,从编译器的错误提示中,无法找到osg的读写字体文件的插件DLL。因为我删除了所有与osg相关的环境变量,我在我的机器上安装了几个版本的osg,将这些不同版本的osg写入环境变量是冲突的。所以程序无法找到相应的osg读写文件插件,并报告了一个错误
二、解决
1.修改系统环境变量
在系统环境变量中,只有一个版本的osg路径被保留,并且运行项目使用osg的路径在环境变量中设置。 缺点是,环境变量被反复修改,机器需要重新启动,造成太多麻烦。
2.在每个osg项目中配置了osg头文件lib和 dll的插件
在环境变量中删除与osg关联的路径,每个osg项目包含了osg头文件lib和DLL已经插件

相关新闻
- 2022-08-04 WPF的由来
- 2022-08-04 Win11勒索软件防护怎么打开?Win11安
- 2022-08-04 Windows系统jdk的配置
- 2022-08-04 Windows10 OneNote怎么重新登录?如何重
- 2022-08-04 超好用的 Windows 效率工具推荐
- 2022-08-04 Windows如何在CMD或PowerShell中配置代理
- 2022-08-04 powershell和cmd对比
- 2022-08-04 【QT】Windows下QT下载安装
- 2022-08-04 windows下 C++ 实现类属性的get和set方
- 2022-08-04 Win11快速助手在哪里?Win11打开快速
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
