Hej!Xerces linking error LNK2001: unresolved external symbol... using VC++ 6.0
Jag har länkningsproblem när jag använder xerces parser i VC++ 6.0.
Jag har:
1. laddat ner och packat upp xerces-c2_2_0-win32 binary.
2. inkluderat \include\.h directory i tools->options->directories->includ Files
3. inkluderat \lib\.lib directory i tools->options->directories->library Files
4. lagt till \bin till min PATH
Varför fungerar inte länkningen?
Hör följer koden jag försöker exekverera...
#include "stdafx.h"
#include <iostream>
#include <hash_map>
#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/dom/DOM.hpp>
#include <xercesc/sax/HandlerBase.hpp>
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/PlatformUtils.hpp>
using namespace xercesc;
int main(int argc, char* argv[])
{
try
{
XMLPlatformUtils::Initialize();
XercesDOMParser* parser = new XercesDOMParser();
}
catch (const XMLException& e)
{
}
return 0;
}
Följande felkod erhåller jag när jag kompilerat...
Linking...
xml.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_2_2::XMLString::release(char * *)"
(__imp_?release@XMLString@xercesc_2_2@@SAXPAPAD@Z)
xml.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static char * __cdecl
xercesc_2_2::XMLString::transcode(unsigned short const * const)"
(__imp_?transcode@XMLString@xercesc_2_2@@SAPADQBG@Z)
xml.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: unsigned short const * __thiscall
xercesc_2_2::XMLException::getMessage(void)const "
(__imp_?getMessage@XMLException@xercesc_2_2@@QBEPBGXZ)
xml.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_2_2::XMLPlatformUtils::Initialize(char const * const)"
(__imp_?Initialize@XMLPlatformUtils@xercesc_2_2@@SAXQBD@Z)
xml.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static char const * const
xercesc_2_2::XMLUni::fgXercescDefaultLocale"
(__imp_?fgXercescDefaultLocale@XMLUni@xercesc_2_2@@2QBDB)
Debug/xml.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.
/Tony