I think you class MonitoringTarget should look like the following:

class MonitoringTarget : public osg::Referenced

Give that a try.  Not sure if that is what you error is, but the way it
is below is an error.

On Sat, 2013-02-02 at 10:55 +0530, om prakash Paliwal wrote:
> #include <osg/Referenced>
> #include <iostream>
> 
> 
> class MonitoringTarget : public osg:Referenced {
>         public:
>                 MonitoringTarget(int id) : _id(id) {
>                         std::cout << "Constructing target
> "<<_id<<std::endl;
>                 }
> 
> 
>         protected:
>                 virtual ~MonitoringTarget() {
>                         std::cout << "Destroying target
> "<<_id<<std::endl;
>                 }
> 
> 
>                 int _id;
> };
> 
> 
> int main() {
> 
> 
>         osg::ref_ptr<MonitoringTarget> target =new
> MonitoringTarget(0);
>         std::cout << "Referenced count before referring: "
>                   << target->referenceCount() << std::endl;
> 
> 
>         osg::ref_ptr<MonitoringTarget> anotherTarget = target;
>         std::cout << "Referenced count after referring: "
>                   << target->referenceCount() <<std::endl;
> 
> 
>         for (unsigned int i=1;i<5;i++) {
>                 osg::ref_ptr<MonitoringTarget> subTarget = new
> MonitoringTarget(i);
>         }
> }
> 
> 
> 
> 
> 
> 
> On Sat, Feb 2, 2013 at 4:54 AM, Michael W. Hall <hal...@att.net>
> wrote:
>         Sounds like you may have missed an include file in your
>         test.cpp file,
>         or you have included something that it does not know about.
>          If your
>         program is short you may want to paste it into a reply and
>         then people
>         could maybe determine the problem.
>         
>         Michael
>         
>         On Fri, 2013-r2-01 at 19:10 +0530, om prakash Paliwal wrote:
>         > i am a beggineer ... and i stuck at very begining . i
>         created my first
>         > OSG program in ubuntu i get this error message ...
>         >
>         >
>         >
>         >
>         > Scanning dependencies of target MyProject
>         > [100%] Building CXX object
>         CMakeFiles/MyProject.dir/test.cpp.o
>         > /home/heart-hacker/osgproject/program-2/test.cpp:1:23: fatal
>         error:
>         > osg/ref_ptr: No such file or directory
>         > compilation terminated.
>         > make[2]: *** [CMakeFiles/MyProject.dir/test.cpp.o] Error 1
>         > make[1]: *** [CMakeFiles/MyProject.dir/all] Error 2
>         > make: *** [all] Error 2
>         >
>         >
>         > .... i have used cmake to build CMakeLists.txt .. suceeded
>         >
>         >
>         >  but when run make command , above errors occured.
>         >
>         >
>         >
>         >
>         >
>         >
>         >
>         >
>         >
>         >
>         >
>         
>         > _______________________________________________
>         > osg-users mailing list
>         > osg-users@lists.openscenegraph.org
>         >
>         
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>         
>         
>         _______________________________________________
>         osg-users mailing list
>         osg-users@lists.openscenegraph.org
>         
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
> 
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to