I'm not sure what "META_OBJECT" (all caps) is, or where it's defined. Did
you intend to use "META_Object" from include/osg/Object instead?

One other possible issue I noted: Assuming you intended to use META_Object,
I believe you are required to implement the copy constructor, and I don't
see that in your code...


On Sun, Apr 28, 2013 at 6:38 AM, Sajjadul Islam <[email protected]>wrote:

> Hi forum,
>
> I am extending a osg::Object as follows:
>
>
> Code:
>
>         class LIBRARY_EXPORT osgOpenCLContext : public osg::Object
>         {
>                 public:
>                         osgOpenCLContext();
>
>                         META_OBJECT(osgOpenCL,osgOpenCLContext);
>
>
>                         bool setupOsgOpenCLAndViewer(osgViewer::ViewerBase
> &viewer,
>                                                      int ctxID = -1);
>
>                         ~osgOpenCLContext();
>
>       };
>
>
>
>
> And i am getting the following error among many others:
>
>
> Code:
>
> [ 62%] Building CXX object
> src/osgOpenCL/CMakeFiles/osgOpenCL.dir/osgOpenCLContext.cpp.o
> In file included from
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgOpenCL/osgOpenCLContext.cpp:7:0:
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/include/osgOpenCL/osgOpenCLContext:22:16:
> error: ‘osgOpenCL’ is not a type
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/include/osgOpenCL/osgOpenCLContext:22:42:
> error: ISO C++ forbids declaration of ‘META_OBJECT’ with no type
> [-fpermissive]
>
>
>
>
>
> Any idea folks ? i used to know that META_Object and META_Node are just
> convenience macro's that help streamline
> the writing of subclasses, have a look at their definition to see what they
> do.  The methods that these macros implement are useful for implementing IO
> and other ops that require richer RTTI info that C++ provides by default.
>
> Please fill out if i miss anything in the process
>
> Thank you!
>
> Cheers,
> Sajjadul
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=53846#53846
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Paul Martz
Skew Matrix Software LLC
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to