问题
#include "osgViewer/Viewer"
#include "osgDB/ReadFile"
int main(int argc, char** argv)
{
osgViewer::Viewer viewer;
viewer.setSceneData(osgDB::readNodeFile("cow.osg"));
return viewer.run();
}
Error reading file cow.osg: read error (Could not find plugin to read objects from file “cow.osg”.)
原因
我在一台机器上用osg3.6.5 编译的库,然后写的程序,运行正常,但拷贝到另一天机器上,另一天机器是osg3.7.0编译的库,所以导致运行出错
osg3.6.5的库
osg3.7.0的库