查看: 2353|回复: 5

osg3.4.0+osgearth2.7+vs2010编译osgearth时报如下错误,求大神帮忙看看!

[复制链接]

该用户从未签到

发表于 2015-9-11 15:12:22 | 显示全部楼层 |阅读模式
1>KMZArchive.obj : error LNK2019: unresolved external symbol _unzOpen referenced in function "public: __thiscall KMZArchive::KMZArchive(class osgEarth::URI const &)" (??0KMZArchive@@QAE@ABVURI@osgEarth@@@Z)
1>KMZArchive.obj : error LNK2019: unresolved external symbol _unzCloseCurrentFile referenced in function "public: bool __thiscall KMZArchive::readToBuffer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?readToBuffer@KMZArchive@@QBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$basic_ostream@DU?$char_traits@D@std@@@3@@Z)
1>KMZArchive.obj : error LNK2019: unresolved external symbol _unzReadCurrentFile referenced in function "public: bool __thiscall KMZArchive::readToBuffer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?readToBuffer@KMZArchive@@QBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$basic_ostream@DU?$char_traits@D@std@@@3@@Z)
1>KMZArchive.obj : error LNK2019: unresolved external symbol _unzOpenCurrentFilePassword referenced in function "public: bool __thiscall KMZArchive::readToBuffer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?readToBuffer@KMZArchive@@QBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$basic_ostream@DU?$char_traits@D@std@@@3@@Z)
1>KMZArchive.obj : error LNK2019: unresolved external symbol _unzGoToNextFile referenced in function "public: bool __thiscall KMZArchive::readToBuffer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?readToBuffer@KMZArchive@@QBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$basic_ostream@DU?$char_traits@D@std@@@3@@Z)
1>KMZArchive.obj : error LNK2019: unresolved external symbol _unzGetCurrentFileInfo referenced in function "public: bool __thiscall KMZArchive::readToBuffer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?readToBuffer@KMZArchive@@QBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$basic_ostream@DU?$char_traits@D@std@@@3@@Z)
1>KMZArchive.obj : error LNK2019: unresolved external symbol _unzGoToFirstFile referenced in function "public: bool __thiscall KMZArchive::readToBuffer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?readToBuffer@KMZArchive@@QBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$basic_ostream@DU?$char_traits@D@std@@@3@@Z)
1>KMZArchive.obj : error LNK2019: unresolved external symbol _unzLocateFile referenced in function "public: bool __thiscall KMZArchive::readToBuffer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?readToBuffer@KMZArchive@@QBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$basic_ostream@DU?$char_traits@D@std@@@3@@Z)
1>D:\Project\OSG\OSGEARTH\build\lib\Debug\osgdb_kmld.dll : fatal error LNK1120: 8 unresolved externals

该用户从未签到

 楼主| 发表于 2015-9-11 16:03:51 | 显示全部楼层
在编译osgearth的时候我已链接了minizip的头文件和zlibstat.lib的库文件

该用户从未签到

发表于 2016-2-21 22:27:06 | 显示全部楼层
楼主,你好,上述问题解决了吗?我也遇到与你类似链接错误,不知道如何解决,感觉是zlib有问题,重新编译了zlib,也不行啊,我用osg3.2.1+osgearth2.5+Qt4.8.6+vs2010,其它都编译通过了,就有上述链接错误,插件kMZ插件库没生成

该用户从未签到

 楼主| 发表于 2016-3-14 09:45:57 | 显示全部楼层
恩  我已经解决了,我使用了最新的osg,这个版本异界不适用minizip了

该用户从未签到

发表于 2016-4-16 13:45:49 | 显示全部楼层
请问楼主,你们编译的时候,3drparty的库,是osg官方下载的吗?,为什么我编译最新的无法加载影像图osgearth_map中的例子,显示的是白色的,是3drparty库版本太旧的原因吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

OSG中国官方论坛-有您OSG在中国才更好

网站简介:osgChina是国内首个三维相关技术开源社区,旨在为国内更多的技术开发人员提供最前沿的技术资讯,为更多的三维从业者提供一个学习、交流的技术平台。

联系我们

  • 工作时间:09:00--18:00
  • 反馈邮箱:1315785073@qq.com
快速回复 返回顶部 返回列表