[osg-users] invalid use of incomplete type ‘std::ifstream in readNodeFile

Robert Osfield robert.osfield at gmail.com
Tue Sep 13 03:10:38 PDT 2016


Hi Kyungsoo,

I used Kubuntu 16.04 for development and haven't seen an error like
you've described so there must be something specific to your system
that is causing the problem.

Did you build the OSG youself or did you pull it into from a repository?

If you built it yourself did you get any compile errors?

Have you tried any other versions of the OSG?

Robert.

On 13 September 2016 at 00:34, kyungsoo hong <chesed71 at gmail.com> wrote:
> Hi,
>
> I'm newbie to osg, just installed and started 'hello world' with below code
> osg::ref_ptr<osg::Node> root = osgDB::readNodeFile( std::string("cessna.osg" ));
>
> but I got error  like this
> In file included from /osgTester/main.cpp:2:0:
>
> /usr/local/include/osgDB/fstream:34:30: error: invalid use of incomplete type ‘std::ifstream {aka class std::basic_ifstream<char>}’
>  class ifstream : public std::ifstream
>                               ^
> In file included from /usr/include/c++/5/ios:38:0,
>                  from /usr/include/c++/5/ostream:38,
>                  from /usr/include/c++/5/iostream:39,
>                  from /home/osgTester/main.cpp:1:
> /usr/include/c++/5/iosfwd:116:11: note: declaration of ‘std::ifstream {aka class std::basic_ifstream<char>}’
>      class basic_ifstream;
>
> using osg 3.4 on Ubuntu 16.04
>
> Thank you!
>
> Cheers,
> kyungsoo
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68586#68586
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list