aneng 发表于 2010-9-17 22:13:06

osgGIS编译求救

本帖最后由 aneng 于 2010-9-17 22:14 编辑

各位高手,你们好。我是个初学者,想把osggis重新编译一下(实在找不到编译好的!),cmake为2.4.7版本,下载了osggis的第三方包(包括expat、lua51、tolua51)还有gdal1.6,osg为2.8.3版本(官网下载的),用vs2005sp1进行编译,现在的情况是除了osggis.dll没有编译出来,其他都出来了,包括哪些exe文件,报错的信息是这样的:
1>------ 已启动生成: 项目: osgGIS, 配置: Release Win32 ------
1>正在链接...
1>LINK : warning LNK4044: 无法识别的选项“/lpthread”;已忽略
1>tolua51.lib(tolua_push.obj) : 找到 MSIL .netmodule 或使用 /GL 编译的模块;正在使用 /LTCG 重新启动链接;将 /LTCG 添加到链接命令行以改进链接器性能
1>LINK : warning LNK4044: 无法识别的选项“/lpthread”;已忽略
1>   正在创建库 F:\OSGGIS\lib\Release\osgGIS.lib 和对象 F:\OSGGIS\lib\Release\osgGIS.exp
1>LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>ResourceCache.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall osg::Referenced::unref(void)const " (__imp_?unref@Referenced@osg@@QBEHXZ)
__thiscall osg::Referenced::unref(void)const " (__imp_?unref@Referenced@osg@@QBEHXZ)
1>;Property.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall osg::Referenced::unref(void)const " (__imp_?unref@Referenced@osg@@QBEHXZ)
1>RandomGroupingFilter.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall osg::Referenced::unref(void)const " (__imp_?unref@Referenced@osg@@QBEHXZ)
1>OGR_Feature.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall osg::Referenced::unref(void)const " (__imp_?unref@Referenced@osg@@QBEHXZ)
1>OGR_FeatureStore.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall osg::Referenced::unref(void)const " (__imp_?unref@Referenced@osg@@QBEHXZ)
1>OGR_SpatialReference.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall osg::Referenced::unref(void)const " (__imp_?unref@Referenced@osg@@QBEHXZ)
1>OGR_SpatialReferenceFactory.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall osg::Referenced::unref(void)const " (__imp_?unref@Referenced@osg@@QBEHXZ)
1>Lua_ScriptEngine_tolua.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall osg::Referenced::unref(void)const " (__imp_?unref@Referenced@osg@@QBEHXZ)
1>ModelResource.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall osg::Referenced::unref(void)const " (__imp_?unref@Referenced@osg@@QBEHXZ)
1>NodeFilter.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall osg::Referenced::unref(void)const " (__imp_?unref@Referenced@osg@@QBEHXZ)
osg::Image::setImage(int,int,int,int,unsigned int,unsigned int,unsigned char *,enum osg::Image::AllocationMode,int)" (?setImage@Image@osg@@UAEXHHHHIIPAEW4AllocationMode@12@H@Z)
readImageFromCurrentTexture@Image@osg@@UAEXI_NI@Z)
ce.obj : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) class osg::Image * __cdecl osgDB::readImageFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class osgDB::Options const *)" (__imp_?readImageFile@osgDB@@YAPAVImage@osg@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBVOptions@1@@Z)
1>F:\OSGGIS\lib\Release/osgGIS.dll : fatal error LNK1120: 32 个无法解析的外部命令
1>生成日志保存在“file://f:\OSGGIS\src\osgGIS\Release\BuildLog.htm”
1>osgGIS - 194 个错误,3 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========

请各位大侠帮我看看,到底哪里出错了,非常感谢,已经折磨我一个星期了!!!多谢多谢!!

wangxiao358 发表于 2010-9-22 15:03:17

应该是 lib 没有包含对哦。

wangxiao358 发表于 2010-9-22 15:05:04

;P我的刚编译好..你努把里吧
页: [1]
查看完整版本: osgGIS编译求救