|
今天看书,敲了一些代码:
#ifdef _DEBUG
#pragma comment(lib, "osgViewerd.lib")
#pragma comment(lib, "osgDBd.lib")
#pragma comment(lib, "OpenThreadsd.lib")
#pragma comment(lib, "osgd.lib")
#else
#pragma comment(lib, "osgViewer.lib")
#pragma comment(lib, "osgDB.lib")
#pragma comment(lib, "OpenThreads.lib")
#pragma comment(lib, "osg.lib")
#endif
#include<osgViewer/Viewer>
#include <osgDB/ReadFile>
int main()
{
osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer ;
viewer->setSceneData(osgDB::readNodeFile("glider.osg"));
return viewer->run();
}
书里面的例子。 我在C++目录的可执行文件目录加载了I:\BJMilitary\3DVirtulMaker\OpenSceneGraph-3.0.1-VS10.0.30319-x86-debug-12741\bin;编译成功。但运行的时候报无法启动此程序,因为计算机中丢失osg80-osgViewerd.dll。但这个dll是在上面那个文件夹里面的。求解答 |
|