Hello champak, 

try to copy the dll to you programm sourcefolder and include the xerceslib 
in your programm. 
Another idea is to include the source folder of xerces in the include path 
of your programm.

perhaps this ca help you

david

champak <[EMAIL PROTECTED]> schrieb am 12.09.2008 09:54:41:

> 
> i have linked it to xerces-c_2D.lib, this library is generated when i 
build
> xerceslib proj, a dll xerces-c_2_8D.dll is also generated, but i went on
> with static one only, should i try out the dll, these static variables
> should be defined in the library? 
> 
> 
> Alberto Massari wrote:
> > 
> > Did you tell the linker to link against xerces-c_2.lib?
> > 
> > Alberto
> > 
> > champak wrote:
> >> hi i am getting following link errors when i am using vs 2005 to 
build me
> >> app
> >> containing the sample parser code which is given on the xerces 
website.
> >>
> >> 1>codegen.obj : error LNK2001: unresolved external symbol "public: 
static
> >> class xercesc_2_8::MemoryManager *
> >> xercesc_2_8::XMLPlatformUtils::fgMemoryManager"
> >> 
([EMAIL PROTECTED]@xercesc_2_8@@[EMAIL PROTECTED]@A)
> >> 1>codegen.obj : error LNK2001: unresolved external symbol "public: 
static
> >> char const * const xercesc_2_8::XMLUni::fgXercescDefaultLocale"
> >> ([EMAIL PROTECTED]@xercesc_2_8@@2QBDB)
> >> 1>E:\codegen\codegen\Debug\codegen.exe : fatal error LNK1120: 2
> >> unresolved
> >> externals
> >>
> >> code :
> >>     #include <xercesc/parsers/XercesDOMParser.hpp>
> >>     #include <xercesc/dom/DOM.hpp>
> >>     #include <xercesc/sax/HandlerBase.hpp>
> >>     #include <xercesc/util/XMLString.hpp>
> >>    #include <xercesc/framework/MemoryManager.hpp>
> >>     #include <xercesc/util/PlatformUtils.hpp>
> >> 
> >>     #if defined(XERCES_NEW_IOSTREAMS)
> >>     #include <iostream>
> >> using namespace std;
> >>     #else
> >>     #include <iostream.h>
> >>     #endif
> >>
> >>     XERCES_CPP_NAMESPACE_USE
> >>
> >>     int main (int argc, char* args[]) {
> >>
> >>         try {
> >>             XMLPlatformUtils::Initialize();
> >>         }
> >>         catch (const XMLException& toCatch) {
> >>             char* message = 
XMLString::transcode(toCatch.getMessage());
> >>          cout << "Error during initialization! :\n"
> >>                  << message << "\n";
> >>             XMLString::release(&message);
> >>             return 1;
> >>         }
> >>
> >>         XercesDOMParser* parser = new XercesDOMParser();
> >>         parser->setValidationScheme(XercesDOMParser::Val_Always); 
> >>         parser->setDoNamespaces(true);    // optional
> >>
> >>         ErrorHandler* errHandler = (ErrorHandler*) new HandlerBase();
> >>         parser->setErrorHandler(errHandler);
> >>
> >>         char* xmlFile = "..\testdata\test.xml";
> >>
> >>         try {
> >>             parser->parse(xmlFile);
> >>         }
> >>         catch (const XMLException& toCatch) {
> >>             char* message = 
XMLString::transcode(toCatch.getMessage());
> >>          cout << "Exception message is: \n"
> >>                << message << "\n";
> >>             XMLString::release(&message);
> >>             return -1;
> >>         }
> >>         catch (const DOMException& toCatch) {
> >>             char* message = XMLString::transcode(toCatch.msg);
> >>             cout << "Exception message is: \n"
> >>                << message << "\n";
> >>             XMLString::release(&message);
> >>             return -1;
> >>         }
> >>         catch (...) {
> >>            cout << "Unexpected Exception \n" ;
> >>             return -1;
> >>         }
> >>
> >>         delete parser;
> >>         delete errHandler;
> >>         return 0;
> >>     }
> >>
> >> plz help!
> >>
> >> regards
> >> deepak
> >> 
> > 
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/link-error-
> tp19450473p19451298.html
> Sent from the Xerces - C - Users mailing list archive at Nabble.com.
> 

Reply via email to