请问Apache的xerces-for-linux的samples怎么让他编译通过?

sperfect 2003-05-05 08:42:34
我下载了Apache的xerces-c-LINUX-c++-2_2_0,想改一下他samples下的例子自己使用,可是他的例子编译的时候出现:
/tmp/cc1NBYhu.o: In function `main':
/tmp/cc1NBYhu.o(.text+0x46): undefined reference to `xercesc_2_2::XMLUni::fgXercescDefaultLocale'
/tmp/cc1NBYhu.o(.text+0x4b): undefined reference to `xercesc_2_2::XMLPlatformUtils::Initialize(char const*)'
/tmp/cc1NBYhu.o(.text+0xfc): undefined reference to `xercesc_2_2::XMLPlatformUtils::Terminate()'
/tmp/cc1NBYhu.o(.text+0x136): undefined reference to `xercesc_2_2::XMLPlatformUtils::Terminate()'
/tmp/cc1NBYhu.o(.text+0x161): undefined reference to `xercesc_2_2::XMLPlatformUtils::Terminate()'
/tmp/cc1NBYhu.o(.text+0x1a7): undefined reference to `xercesc_2_2::DTDValidator::DTDValidator[in-charge](xercesc_2_2::XMLErrorReporter*)'
/tmp/cc1NBYhu.o(.text+0x21d): undefined reference to `xercesc_2_2::SAXParser::SAXParser[in-charge](xercesc_2_2::XMLValidator*)'
/tmp/cc1NBYhu.o(.text+0x28b): undefined reference to `xercesc_2_2::SAXParser::setValidationScheme(xercesc_2_2::SAXParser::ValSchemes)'
/tmp/cc1NBYhu.o(.text+0x2b1): undefined reference to `xercesc_2_2::SAXParser::getErrorCount() const'
/tmp/cc1NBYhu.o(.text+0x3a7): undefined reference to `xercesc_2_2::XMLPlatformUtils::Terminate()'
/tmp/cc1NBYhu.o(.text+0x80e): undefined reference to `xercesc_2_2::XMLPlatformUtils::Terminate()'
/tmp/cc1NBYhu.o(.gcc_except_table+0x9c): undefined reference to `typeinfo for xercesc_2_2::XMLException'
/tmp/cc1NBYhu.o: In function `xercesc_2_2::NoSuchElementException::NoSuchElementException[in-charge](char const*, unsigned, xercesc_2_2::XMLExcepts::Codes)':
/tmp/cc1NBYhu.o(.gnu.linkonce.t._ZN11xercesc_2_222NoSuchElementExceptionC1EPKcjNS_10XMLExcepts5CodesE+0x14): undefined reference to `xercesc_2_2::XMLException::XMLException[not-in-charge](char const*, unsigned)'
/tmp/cc1NBYhu.o(.gnu.linkonce.t._ZN11xercesc_2_222NoSuchElementExceptionC1EPKcjNS_10XMLExcepts5CodesE+0x2e): undefined reference to `xercesc_2_2::XMLException::loadExceptText(xercesc_2_2::XMLExcepts::Codes)'
/tmp/cc1NBYhu.o(.gnu.linkonce.t._ZN11xercesc_2_222NoSuchElementExceptionC1EPKcjNS_10XMLExcepts5CodesE+0x44): undefined reference to `xercesc_2_2::XMLException::~XMLException [not-in-charge]()'
/tmp/cc1NBYhu.o: In function `xercesc_2_2::NoSuchElementException::NoSuchElementException[in-charge](xercesc_2_2::NoSuchElementException const&)':
/tmp/cc1NBYhu.o(.gnu.linkonce.t._ZN11xercesc_2_222NoSuchElementExceptionC1ERKS0_+0x10): undefined reference to `xercesc_2_2::XMLException::XMLException[not-in-charge](xercesc_2_2::XMLException const&)'
/tmp/cc1NBYhu.o: In function `xercesc_2_2::NoSuchElementException::~NoSuchElementException [in-charge]()':
/tmp/cc1NBYhu.o(.gnu.linkonce.t._ZN11xercesc_2_222NoSuchElementExceptionD1Ev+0x16): undefined reference to `xercesc_2_2::XMLException::~XMLException [not-in-charge]()'
/tmp/cc1NBYhu.o: In function `xercesc_2_2::XMLElementDecl::getFullName() const':
/tmp/cc1NBYhu.o(.gnu.linkonce.t._ZNK11xercesc_2_214XMLElementDecl11getFullNameEv+0x10): undefined reference to `xercesc_2_2::QName::getRawName()'
/tmp/cc1NBYhu.o: In function `StrX::StrX[in-charge](unsigned short const*)':
/tmp/cc1NBYhu.o(.gnu.linkonce.t._ZN4StrXC1EPKt+0x11): undefined reference to `xercesc_2_2::XMLString::transcode(unsigned short const*)'
/tmp/cc1NBYhu.o: In function `StrX::~StrX [in-charge]()':
/tmp/cc1NBYhu.o(.gnu.linkonce.t._ZN4StrXD1Ev+0xd): undefined reference to `xercesc_2_2::XMLString::release(char**)'
/tmp/cc1NBYhu.o(.gnu.linkonce.d._ZTIN11xercesc_2_222NoSuchElementExceptionE+0x8): undefined reference to `typeinfo for xercesc_2_2::XMLException'
/tmp/cc1NBYhu.o: In function `xercesc_2_2::NoSuchElementException::~NoSuchElementException [in-charge deleting]()':
/tmp/cc1NBYhu.o(.gnu.linkonce.t._ZN11xercesc_2_222NoSuchElementExceptionD0Ev+0x16): undefined reference to `xercesc_2_2::XMLException::~XMLException [not-in-charge]()'
/tmp/cc1NBYhu.o: In function `xercesc_2_2::NoSuchElementException::getType() const':
/tmp/cc1NBYhu.o(.gnu.linkonce.t._ZNK11xercesc_2_222NoSuchElementException7getTypeEv+0x4): undefined reference to `xercesc_2_2::XMLUni::fgNoSuchElementException_Name'
collect2: ld returned 1 exit status
是不是lib文件没连接好?请问怎么链接?头函数我已经放到/usr/include中间去了。谢谢!
...全文
51 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
sperfect 2003-05-07
  • 打赏
  • 举报
回复
真的没有人知道?
sperfect 2003-05-06
  • 打赏
  • 举报
回复
现在samples下的能通过了,但不知道如何编译和链接自己写的程序。请指教。
sperfect 2003-05-06
  • 打赏
  • 举报
回复
为什么自己写的文件中间g++的时候会出现
/tmp/ccXiZIEV.o(.text+0x43): undefined reference to `xercesc_2_2::XMLUni::fgXercescDefaultLocale'
/tmp/ccXiZIEV.o(.text+0x48): undefined reference to `xercesc_2_2::XMLPlatformUtils::Initialize(char const*)'
这样的错误啊?谁能告诉我怎样编写一个最简单的例子文件?谢谢!

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧