以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XML源码及示例(仅原创和转载) 』  (http://bbs.xml.org.cn/list.asp?boardid=32)
----  g++ 编译xerces包错误,请教各位高手  (http://bbs.xml.org.cn/dispbbs.asp?boardid=32&rootid=&id=10601)


--  作者:hsmao
--  发布时间:9/25/2004 3:28:00 PM

--  g++ 编译xerces包错误,请教各位高手
#include <stdio.h>
#include <stdlib.h>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/TransService.hpp>
#include <xercesc/parsers/SAXParser.hpp>
#include "saxprint.hpp"
int main(int argC, char* argV[])
{
   printf("saxprint is ok! \n");
}错误如下:Undefined                       first referenced
symbol                             in file
xercesc_2_5::XMLException::XMLException(char const *, unsigned int, xercesc_2_5o
xercesc_2_5::XMemory::operator delete(void *, xercesc_2_5::MemoryManager *)/varo
xercesc_2_5::XMLException::XMLException(xercesc_2_5::XMLException const &)/var/o
xercesc_2_5::XMLException type_info node/var/tmp/ccnGIKcz.o
xercesc_2_5::XMLException type_info function/var/tmp/ccnGIKcz.o
xercesc_2_5::XMemory::operator delete(void *)/var/tmp/ccnGIKcz.o
xercesc_2_5::XMemory::operator new(unsigned int, xercesc_2_5::MemoryManager *)/o
xercesc_2_5::XMLUni::fgArrayIndexOutOfBoundsException_Name    /var/tmp/ccnGIKczo
xercesc_2_5::XMLException::loadExceptText(xercesc_2_5::XMLExcepts::Codes)      o
xercesc_2_5::XMLException::~XMLException(void)/var/tmp/ccnGIKcz.o
ld: fatal: Symbol referencing errors. No output written to saxprint
collect2: ld returned 1 exit status
编译命令如下:g++  -o saxprint -g  saxprint.cpp -I/export/home/csi/include -I/usr/xerces/c250/include -L/usr/xerces/c250/lib
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms