在用vcpkg编译完osg和osgearth后,为了验证osgearth编译是否正确,进行测试,模型加载代码如下:
root->addChild(osgDB::readNodeFile("simple.earth"));
此时以为是simple.earth路径的问题,遂改为以下代码:
root->addChild(osgDB::readNodeFile("D:\\OSGCore\\OSGEarth\\data\\simple.earth"));
但还是无法加载。
参考这篇文章解决了问题