I had a look at your 'broken' source.
There was no main function, so I added one in as follows:
int main() {
XMLPlatformUtils::Initialize();
XercesDOMParser* parser = ParseXML("input");
return 0;
}
I commented out the QK:: push stuff, because it's not part of the library (that
I know of).
I added
#include <xercesc/parsers/XercesDOMParser.hpp>
I don't have / don't use util.hpp so I added
namespace {
typedef std::basic_string<XMLCh> XercesString;
}
Regardless, I have sent you the source code directly.
It compiles and runs.
I don't really know why you would want to return the parser having parsed a
file. Normally one wants the document from the parse.
Maybe you are just getting the basics up first...!
On 18 May 2010, at 12:01, Patrick Rutkowski wrote:
> If any of you Xerces-C devs are up for it, I would be willing to go as far as
> doing a screen-sharing session to debug this, since it seems to be impossible
> to reproduce. I have my version of xerces already built with -g -O0 even.
>
> Of course, that might amount to you helping me find a silly big in my code
> somewhere, free of charge, which might seem unfair. Then again, maybe it
> really is an obscure bug in Xerces, which would make it worth it.
>
> I dunno, I just don't know what to do anymore :-/
>
> -Patrick
>
> On May 18, 2010, at 2:47 AM, Vitaly Prapirny wrote:
>
>> Patrick Rutkowski wrote:
>>> I have verified with test prints and gdb that fatalError()
>>> in ThrowErrorHandler is indeed triggered like it's supposed
>>> to be, so we're good so far.
>>
>> So the parser->setErrorHandler() is not broken actually, your subject
>> line misleads. I could assume your toolchain or project is
>> somewhat broken. If you could prepare a minimal self-contained test case
>> it would be very helpfull to someone who wished to look at it.
>>
>> Good luck!
>> Vitaly
>