啸天獒 发表于 2014-10-8 22:15:33

基于OSG3.2编译VPB0.9.12

基于OSG3.2编译VPB0.9.12出现如下链接错误是为什么

------ Build started: Project: Applications vpbcache, Configuration: Debug Win32 ------
Build started 2014/10/8 22:03:40.
InitializeBuildStatus:
Touching "application_vpbcache.dir\Debug\Applications vpbcache.unsuccessfulbuild".
CustomBuild:
All outputs are up-to-date.
ClCompile:
All outputs are up-to-date.
ManifestResourceCompile:
All outputs are up-to-date.
Link:
   Creating library D:/OSG/VPB/VS2010/bin/Debug/vpbcached.lib and object D:/OSG/VPB/VS2010/bin/Debug/vpbcached.exp
vpbcache.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall osgTerrain::TerrainTile::TerrainTile(void)" (__imp_??0TerrainTile@osgTerrain@@QAE@XZ) referenced in function _main
vpbcache.obj : error LNK2001: unresolved external symbol "public: virtual class osg::Object * __thiscall osgTerrain::TerrainTile::cloneType(void)const " (?cloneType@TerrainTile@osgTerrain@@UBEPAVObject@osg@@XZ)
vpbcache.obj : error LNK2001: unresolved external symbol "public: virtual class osg::Object * __thiscall osgTerrain::TerrainTile::clone(class osg::CopyOp const &)const " (?clone@TerrainTile@osgTerrain@@UBEPAVObject@osg@@ABVCopyOp@4@@Z)
vpbcache.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall osgTerrain::TerrainTile::isSameKindAs(class osg::Object const *)const " (?isSameKindAs@TerrainTile@osgTerrain@@UBE_NPBVObject@osg@@@Z)
vpbcache.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall osgTerrain::TerrainTile::libraryName(void)const " (?libraryName@TerrainTile@osgTerrain@@UBEPBDXZ)
vpbcache.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall osgTerrain::TerrainTile::className(void)const " (?className@TerrainTile@osgTerrain@@UBEPBDXZ)
vpbcache.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgTerrain::TerrainTile::releaseGLObjects(class osg::State *)const " (?releaseGLObjects@TerrainTile@osgTerrain@@UBEXPAVState@osg@@@Z)
vpbcache.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgTerrain::TerrainTile::accept(class osg::NodeVisitor &)" (?accept@TerrainTile@osgTerrain@@UAEXAAVNodeVisitor@osg@@@Z)
vpbcache.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall osgTerrain::TerrainTile::traverse(class osg::NodeVisitor &)" (?traverse@TerrainTile@osgTerrain@@UAEXAAVNodeVisitor@osg@@@Z)
vpbcache.obj : error LNK2001: unresolved external symbol "public: virtual class osg::BoundingSphereImpl<class osg::Vec3f> __thiscall osgTerrain::TerrainTile::computeBound(void)const " (?computeBound@TerrainTile@osgTerrain@@UBE?AV?$BoundingSphereImpl@VVec3f@osg@@@osg@@XZ)
vpbcache.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: virtual __thiscall osgTerrain::TerrainTile::~TerrainTile(void)" (__imp_??1TerrainTile@osgTerrain@@MAE@XZ) referenced in function "protected: virtual void * __thiscall osgTerrain::TerrainTile::`scalar deleting destructor'(unsigned int)" (??_GTerrainTile@osgTerrain@@MAEPAXI@Z)
vpbcache.obj : error LNK2019: unresolved external symbol "__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) referenced in function "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)
vpbcache.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class osgDB::Options * __thiscall osgDB::Registry::getOptions(void)" (__imp_?getOptions@Registry@osgDB@@QAEPAVOptions@2@XZ) referenced in function "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)
vpbcache.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class osgDB::Registry * __cdecl osgDB::Registry::instance(bool)" (__imp_?instance@Registry@osgDB@@SAPAV12@_N@Z) referenced in function "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\VPB\VS2010\bin\Debug\vpbcached.exe : fatal error LNK1120: 14 unresolved externals

Build FAILED.

Time Elapsed 00:00:00.34

zscmeditate 发表于 2015-2-15 15:48:45

去trunk中get最新的版本,可以跟osg3.2一起编译成功

gsygsygsyd 发表于 2015-3-27 10:36:48

zscmeditate 发表于 2015-2-15 15:48
去trunk中get最新的版本,可以跟osg3.2一起编译成功

能提供最新vpb源码的地址吗?svn,git,hg的都可以,github上面最高只有0.9.12的tag

gsygsygsyd 发表于 2015-3-27 10:49:17

gsygsygsyd 发表于 2015-3-27 10:36
能提供最新vpb源码的地址吗?svn,git,hg的都可以,github上面最高只有0.9.12的tag

找到了,地址: http://www.openscenegraph.org/svn/VirtualPlanetBuilder/trunk ,不过公司网络不稳定,蛋疼。

gsygsygsyd 发表于 2015-3-27 10:54:59

zscmeditate 发表于 2015-2-15 15:48
去trunk中get最新的版本,可以跟osg3.2一起编译成功

上面的网址打不开,求个能下的地址。

gsygsygsyd 发表于 2015-3-27 11:07:44

本帖最后由 gsygsygsyd 于 2015-3-27 14:30 编辑

svn地址 : http://svn.openscenegraph.org/VirtualPlanetBuilder
trunk 里的版本是0.9.11

OSG_wy 发表于 2015-4-14 19:09:07

遇到同样的问题,楼主解决没?

啸天獒 发表于 2015-6-18 15:05:17

OSG_wy 发表于 2015-4-14 19:09
遇到同样的问题,楼主解决没?

后来只编译了release版,反正只是个工具嘛

hawayii 发表于 2015-10-24 11:23:24

楼主对比一下那几个出错项目debug和release的属性中的附加依赖项,你会发现debug少添加了部分OSG的lib文件。
比如说你的提示的错误是缺少osgTerraind.lib,把它添加进去就可以了。

hawayii 发表于 2015-10-24 11:26:26

更正一下,你的错误提示不只缺少osgTerraind.lib,反正你看缺少什么lib文件,然后添加进去就好了。
如果嫌麻烦,可以吧对应的release版的附加依赖项中OSG那部分全部拷过去,只不过要在文件名后面加一个'd'字母。

小叶 发表于 2016-10-10 23:03:43

这问题想必困扰大家多年了,本人使用vpb0.9.10配置osg3.2,失败;0.9.11,失败;0.9.12,失败;0.9.13成功。所以不用添加什么别的库,就用正常的配置过程配置vpb就可以,gdal插件用的是2.1.1。
也就是说gdal2.1.1+vpb0.9.13+osg3.2.1可以完美兼容。

luoming1994 发表于 2016-11-29 15:19:42

小叶 发表于 2016-10-10 23:03
这问题想必困扰大家多年了,本人使用vpb0.9.10配置osg3.2,失败;0.9.11,失败;0.9.12,失败;0.9.13成功 ...

vpb0.9.13哪里下载的,能给我一份吗

小叶 发表于 2016-12-7 21:56:55

luoming1994 发表于 2016-11-29 15:19
vpb0.9.13哪里下载的,能给我一份吗

给你

luoming1994 发表于 2016-12-12 20:13:42

小叶 发表于 2016-12-7 21:56
给你

非常感谢
页: [1]
查看完整版本: 基于OSG3.2编译VPB0.9.12