undefined reference to typeinfo for [class name]
Oct 16, 2013 at 4:29am UTC
Hi Forum
There are many explanations for this type of error , but none of them made much sense to me. I have subclassed a class and over-ridden the virtual method as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
void Context::operator () (osg::GraphicsContext *gc)
{
......................
......................
osgViewer::GraphicsWindowX11 *unixWindow = dynamic_cast <osgViewer::GraphicsWindowX11*>(gc);
if (unixWindow == NULL)
{
osg::notify(osg::FATAL) << __FUNCTION__ << ": " << __LINE__ << ": "
<< "Unix Graphics Handle Casting is not successful. " << std::endl;
exit(EXIT_FAILURE);
}
...............................
...............................
}
And i am getting the following error
1 2 3 4 5 6
../../../lib/libosgOpenCLd.so: undefined reference to `typeinfo for osgViewer::GraphicsWindowX11'
collect2: ld returned 1 exit status
make[2]: *** [bin/osgOpenCLEndiannessDemod] Error 1
make[1]: *** [examples/osgOpenCLEndiannessDemo/src/CMakeFiles/example_osgOpenCLEndiannessDemo.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Any idea folks ?
Thanks
Sajjad
Topic archived. No new replies allowed.