[redland-dev] raptortest
Dave Beckett
dave.beckett at bristol.ac.uk
Wed Jul 28 11:15:38 BST 2004
On Wed, 28 Jul 2004 10:28:40 +0200
"Trigui, Aymen" <Aymen.Trigui at iao.fhg.de> wrote:
> Hello,
>
> I have been trying for the last couple of days to get the raptortest
> example running.
>
> I am using Visual C++ .Net.
>
> The 2 Projects raptortest and raptor get compiled and linked without
> problems.
>
> But when running the .exe I get an "Access violation writing
> location".
>
> I debugged the example and found out that the following line in the
> raptortest main() :
>
> raptor_parser* p = raptor_new_parser(NULL);
>
> returns Null as p and that's why the method
That's a hint that there are no parsers available at all.
>
> raptor_set_statement_handler(p, NULL, dump_statement);
>
> raises this access violation.
>
> I tried to substitute the NULL in raptor_new_parser(NULL); with "" or
> "rdfxml" but I get the same problem.
>
> Has anyone an Idea how to solve this problem?
I looked at the win32/raptortest.cpp code - which was last modified
in 2001, and not by me. The code looks particularly dubious.
The bug seems to be that the parser library isn't initialised (or
terminated). If you add a raptor_init() call before any call to the
library, it might work now. (raptor_finish() before exit too).
More docs and a summary at the top of
http://www.redland.opensource.ac.uk/raptor/libraptor.html
The rapper utility, although not in C++, is the best example code
of how to invoke the parser standalone. See rdfdump.c in the
sources.
Dave
More information about the redland-dev
mailing list