首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

,Xerces 的配置

2012-02-26 
各位高手,求助Xerces 的配置小弟按照网上的步骤 一步一步配的。VC-6用的时间也不短了,添加lib 和 include还

各位高手,求助Xerces 的配置
小弟按照网上的步骤 一步一步配的。
  VC-6用的时间也不短了,添加lib 和 include还是知道的。
用的是xerces-c-src_2_7_0, 解压后 有4个lib文件,分别是:xerces-c_2_7.dll、xerces-c_2_7D.dll、xerces-c_2.lib、xerces-c_2D.lib。 我是在link中添加的 库路径,然后把两个 静态lib文件加到project->setting的。
  之后又把两个 dll文件直接添加到 我自己工程中的Debug文件中,然后尝试了这段代码:

#include <iostream>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/dom/DOM.hpp>
#include <xercesc/parsers/XercesDOMParser.hpp>

using namespace xercesc;

int main (){
try
{  
XMLPlatformUtils::Initialize();
}
catch(xercesc::XMLException & excp) 
{
char* msg = XMLString::transcode(excp.getMessage());
printf("XML toolkit initialization error: %s\n", msg);
XMLString::release(&msg);
}
  return 0;
}
报两个错Error: unresolved external symbol "__declspec(dllimport) public: transcode
  unresolved external symbol "__declspec(dllimport) public:getmessage;
PS:我各个版本的 Xerces都尝试了,现在真的茫了

[解决办法]
我在VC8(VS 2005)的xerces-c++ 3.1.0中试了LZ的程序没有问题.

热点排行