pzytln 发表于 2014-10-11 13:09:12

急!求大神解决osg配置后vs2010编译出错

代码如下
#include "stdafx.h"


#include<osgViewer/Viewer>
#include<osgDB/ReadFile>
int main( int argc, char **argv )
{
osgViewer::Viewer viewer;
viewer.setSceneData( osgDB::readNodeFile( "cow.osg" ) );
return viewer.run();
}
错误如下
错误        1        error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __thiscall osgViewer::Viewer::`vbase destructor'(void)" (__imp_??_DViewer@osgViewer@@QAEXXZ),该符号在函数 _main 中被引用        D:\osg\测试\测试\测试.obj        测试
错误        2        error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: virtual int __thiscall osgViewer::Viewer::run(void)" (__imp_?run@Viewer@osgViewer@@UAEHXZ),该符号在函数 _main 中被引用        D:\osg\测试\测试\测试.obj        测试
错误        3        error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: virtual void __thiscall osgViewer::Viewer::setSceneData(class osg::Node *)" (__imp_?setSceneData@Viewer@osgViewer@@UAEXPAVNode@osg@@@Z),该符号在函数 _main 中被引用        D:\osg\测试\测试\测试.obj        测试
错误        4        error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __thiscall osgViewer::Viewer::Viewer(void)" (__imp_??0Viewer@osgViewer@@QAE@XZ),该符号在函数 _main 中被引用        D:\osg\测试\测试\测试.obj        测试
错误        5        error LNK2019: 无法解析的外部符号 "__declspec(dllimport) class osg::Node * __cdecl osgDB::readNodeFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class osgDB::Options const *)" (__imp_?readNodeFile@osgDB@@YAPAVNode@osg@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBVOptions@1@@Z),该符号在函数 "class osg::Node * __cdecl osgDB::readNodeFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?readNodeFile@osgDB@@YAPAVNode@osg@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中被引用        D:\osg\测试\测试\测试.obj        测试
错误        6        error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class osgDB::Options * __thiscall osgDB::Registry::getOptions(void)" (__imp_?getOptions@Registry@osgDB@@QAEPAVOptions@2@XZ),该符号在函数 "class osg::Node * __cdecl osgDB::readNodeFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?readNodeFile@osgDB@@YAPAVNode@osg@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中被引用        D:\osg\测试\测试\测试.obj        测试
错误        7        error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static class osgDB::Registry * __cdecl osgDB::Registry::instance(bool)" (__imp_?instance@Registry@osgDB@@SAPAV12@_N@Z),该符号在函数 "class osg::Node * __cdecl osgDB::readNodeFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?readNodeFile@osgDB@@YAPAVNode@osg@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中被引用        D:\osg\测试\测试\测试.obj        测试
错误        8        error LNK1120: 7 个无法解析的外部命令        D:\osg\测试\Debug\测试.exe        测试


库目录和包含目录都设置了,附加依赖项也写了,还是没解决,环境还是配不出来啊,求解决
页: [1]
查看完整版本: 急!求大神解决osg配置后vs2010编译出错