Open mchuruvija opened 4 years ago
My solution:
sudo apt-get install libopenscenegraph-dev
sudo cp /usr/include/osg/CameraNode usr/local/include/osg/
sudo apt-get remove libopenscenegraph-dev
I tried to install libopenscenegraph-dev
, but I still cannot find CameraNode. What is the version of libopenscenegraph-dev
that you installed?
The v1.2 CameraNode object has been renamed to Camera in v2.2. Correspondingly, the signature of several methods that take CameraNode as a parameter or return it as a value were modified to reflect the name change. This impacts any code that uses CameraNode, includes the CameraNode header file, or uses any of the methods that take CameraNode as a parameter or return it as a value.
The v1.2 CameraNode object has been renamed to Camera in v2.2. Correspondingly, the signature of several methods that take CameraNode as a parameter or return it as a value were modified to reflect the name change. This impacts any code that uses CameraNode, includes the CameraNode header file, or uses any of the methods that take CameraNode as a parameter or return it as a value.
did you manage to successfully compile with the latest version? If so can you let me know where the changes have to be made? thank you!
The v1.2 CameraNode object has been renamed to Camera in v2.2. Correspondingly, the signature of several methods that take CameraNode as a parameter or return it as a value were modified to reflect the name change. This impacts any code that uses CameraNode, includes the CameraNode header file, or uses any of the methods that take CameraNode as a parameter or return it as a value.
did you manage to successfully compile with the latest version? If so can you let me know where the changes have to be made? thank you!
Changes I made to compile
virtual void operator () (const osg::Camera& camera) const {
if (!_snapImageOnNextFrame) return;
int x,y,width,height;
x = camera.getViewport()->x();
y = camera.getViewport()->y();
width = camera.getViewport()->width();
height = camera.getViewport()->height();
osg::ref_ptr"<<_filename<<"
"<< std::endl;
_snapImageOnNextFrame = false;
}
however I am still getting an error :
[ 89%] Linking CXX executable ../../../bin/cast-cost-unit
/usr/bin/ld: ../../../lib/libosgviewer.so: undefined reference to VTT for osg::Drawable::EventCallback' /usr/bin/ld: ../../../lib/libosgviewer.so: undefined reference to
virtual thunk to osg::Drawable::EventCallback::run(osg::Object, osg::Object)'
/usr/bin/ld: ../../../lib/libosgviewer.so: undefined reference to osg::Drawable::EventCallback::run(osg::Object*, osg::Object*)' /usr/bin/ld: ../../../lib/libosgviewer.so: undefined reference to
virtual thunk to osg::NodeCallback::run(osg::Object, osg::Object)'
/usr/bin/ld: ../../../lib/libosgviewer.so: undefined reference to typeinfo for osg::Drawable::EventCallback' /usr/bin/ld: ../../../lib/libosgviewer.so: undefined reference to
osgUtil::SmoothingVisitor::apply(osg::Geode&)'
/usr/bin/ld: ../../../lib/libosgviewer.so: undefined reference to `vtable for osg::Drawable::EventCallback'
collect2: error: ld returned 1 exit status
make[2]: [src/trajopt/test/CMakeFiles/cast-cost-unit.dir/build.make:98: bin/cast-cost-unit] Error 1
make[1]: [CMakeFiles/Makefile2:519: src/trajopt/test/CMakeFiles/cast-cost-unit.dir/all] Error 2
make: *** [Makefile:95: all] Error 2
I'm following the instalation instructions on http://rll.berkeley.edu/trajopt/doc/sphinx_build/html/install.html#instructions When I make, I get the following error: fatal error: osg/CameraNode: No such file or directory compilation terminated. src/osgviewer/CMakeFiles/osgviewer.dir/build.make:62: recipe for target 'src/osgviewer/CMakeFiles/osgviewer.dir/osgviewer.cpp.o' failed make[2]: [src/osgviewer/CMakeFiles/osgviewer.dir/osgviewer.cpp.o] Error 1 CMakeFiles/Makefile2:788: recipe for target 'src/osgviewer/CMakeFiles/osgviewer.dir/all' failed make[1]: [src/osgviewer/CMakeFiles/osgviewer.dir/all] Error 2
I'm using trajopt git commit 9c634c060f7e2d61c4a888b0a5700d668a5d16f8. Does anyone know how to solve this error?