Board logo

标题: [求助] 【求救】编译simpleVRML提示的错误 [打印本页]

作者: ishow99    时间: 2012-3-12 09:24     标题: 【求救】编译simpleVRML提示的错误

用VS2005编译ARToolkit下面的simpleVRML,老是提示:
2>正在链接...
2>openvrml.lib(browser.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::const_iterator,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::const_iterator)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@Vconst_iterator@01@0@Z),该符号在函数 "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall openvrml::Vrml97Parser::stringValue(void)" (?stringValue@Vrml97Parser@openvrml@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 中被引用
2>openvrml.lib(browser.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::const_iterator __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::begin(void)const " (__imp_?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AVconst_iterator@12@XZ),该符号在函数 "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall openvrml::Vrml97Parser::stringValue(void)" (?stringValue@Vrml97Parser@openvrml@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 中被引用
2>openvrml.lib(browser.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::const_iterator __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::end(void)const " (__imp_?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AVconst_iterator@12@XZ),该符号在函数 "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall openvrml::Vrml97Parser::stringValue(void)" (?stringValue@Vrml97Parser@openvrml@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 中被引用
2>openvrml.lib(doc.obj) : error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::const_iterator __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::end(void)const " (__imp_?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AVconst_iterator@12@XZ)
2>openvrml.lib(doc.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::iterator __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::begin(void)" (__imp_?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AViterator@12@XZ),该符号在函数 "private: bool __thiscall openvrml::doc2::filename(char *,unsigned int)" (?filename@doc2@openvrml@@AAE_NPADI@Z) 中被引用
2>libjpeg.lib(jerror.obj) : error LNK2001: 无法解析的外部符号 __iob
2>libpng.lib(pngerror.obj) : error LNK2001: 无法解析的外部符号 __iob
2>libpng.lib(pngrutil.obj) : error LNK2019: 无法解析的外部符号 __iob,该符号在函数 _png_handle_pHYs 中被引用
2>d:\c++\ARToolKit\examples\simpleVRML\..\..\bin\simpleVRMLd.exe : fatal error LNK1120: 5 个无法解析的外部命令

我看工程里相关库已经引入:ws2_32.lib opengl32.lib glu32.lib glut32.lib libjpeg.lib libpng.lib zlib.lib libarvrmld.lib openvrml.lib openvrml-gl.lib antlr.lib regex.lib libARvideod.lib libARd.lib libARgsub_lited.lib

OpenVRML我也从官网i下载解压到ARToolKit根目录下了;
作者: ishow99    时间: 2012-3-12 16:41

重新编译 OpenVRML,解决了;
作者: popleaf1    时间: 2012-3-27 10:55

是OpenVRML的独立库libjpeg.lib libpng.lib 不兼容引起的问题,你去下载最新版本的,就解决这个问题了。http://sourceforge.net/projects/gnuwin32/files/libpng/

http://sourceforge.net/projects/gnuwin32/files/jpeg/




欢迎光临 ARToolKit中文论坛 (http://artoolkit.net/) Powered by Discuz! 7.0.0