查看: 839|回复: 0

OSG ifstream及ofstream错误

[复制链接]

该用户从未签到

发表于 2017-9-29 10:33:55 | 显示全部楼层 |阅读模式
我是在ubuntu下搭建的qt5.9.1+osg3.2.2的环境,我在尝试进行osg编译时出现这样的错误
/usr/local/include/osgDB/fstream:35: error: invalid use of incomplete type ‘std::ifstream {aka class std::basic_ifstream<char>}’
class OSGDB_EXPORT ifstream : public std::ifstream
                                           ^
以及
/usr/local/include/osgDB/fstream:47: error: invalid use of incomplete type ‘std:fstream {aka class std::basic_ofstream<char>}’
class OSGDB_EXPORT ofstream : public std::ofstream
                                           ^
各位大佬有没有解决的办法啊

下面是我找到的代码,但是我觉得我的代码肯定没问题啊


#include<QApplication>

#include<osgDB/ReadFile>

#include<osgViewer/Viewer>

int main()

{

osgViewer::Viewer viewer;

viewer.setSceneData(osgDB::readNodeFile("/home/pangpang/OpenSceneGraph-3.2.2/cow.osg"));

viewer.realize();

viewer.run();

}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

OSG中国官方论坛-有您OSG在中国才更好

网站简介:osgChina是国内首个三维相关技术开源社区,旨在为国内更多的技术开发人员提供最前沿的技术资讯,为更多的三维从业者提供一个学习、交流的技术平台。

联系我们

  • 工作时间:09:00--18:00
  • 反馈邮箱:1315785073@qq.com
快速回复 返回顶部 返回列表