xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto Massari <amass...@datadirect.com>
Subject Re: Linker Error with Visual Studio 2003
Date Mon, 29 Jan 2007 17:47:13 GMT
You only paste one error, so I can only guess that the option "Treat 
wchar_t as a native type" has different values in the two projects 
(yours and Xerces')

Alberto

At 09.40 29/01/2007 -0800, MBoudreaux wrote:

>I'm trying to learn the Xerces API for an XML application I have in the
>works. I've read through the documentation a few times and I'm having
>trouble compiling my application. I'm getting about ~50 Linker 2001 errors
>(unresolved external symbols). I have the library linked in and the
>directories are correctly defined in the project settings, so I'm a bit
>lost.
>
>Here is how my example application is linking in everything:
>
>#pragma comment(lib, "xerces-c_2.lib")
>
>#include <xercesc/sax2/SAX2XMLReader.hpp>
>#include <xercesc/sax2/XMLReaderFactory.hpp>
>#include <xercesc/sax2/DefaultHandler.hpp>
>#include <xercesc/parsers/SAXParser.hpp>
>#include <xercesc/sax/HandlerBase.hpp>
>#include <xercesc/util/XMLString.hpp>
>
>#if defined(XERCES_NEW_IOSTREAMS)
>#include <iostream>
>#else
>#include <iostream.h>
>#endif
>
>XERCES_CPP_NAMESPACE_USE
>
>XERCES_CPP_NAMESPACE_BEGIN
>class Attributes;
>XERCES_CPP_NAMESPACE_END
>
>
>class SaxParser : public DefaultHandler
>{
>
>...
>
>}
>
>
>Am I linking in things improperly? Is there something else I should check? I
>have already looked at the Environment variable and the PATH is set
>correctly.
>
>Here is an example of the type of errors I am getting:
>
>XMLBinary error LNK2001: unresolved external symbol "public: virtual void
>__thiscall xercesc_2_7::DefaultHandler::startElement(wchar_t const *
>const,wchar_t const * const,wchar_t const * const,class
>xercesc_2_7::Attributes const &)"
>(?startElement@DefaultHandler@xercesc_2_7@@UAEXQB_W00ABVAttributes@2@@Z)
>
>
>Any suggestions?
>--
>View this message in context: 
>http://www.nabble.com/Linker-Error-with-Visual-Studio-2003-tf3137215.html#a8693905
>Sent from the Xerces - C - Users mailing list archive at Nabble.com.


Mime
View raw message