Re: [xml] Docbook compilation error



Mario,

On Wed, 2003-11-19 at 18:00, Mailing Lists wrote:
I have been trying to compile docbook2x version 0.8.2. "as is", i.e. out of the box, but it doesn't want to 
work. I think I have
diligently installed all the required modules and libraries.

In future, could you supply a pointer to docbook2x -- I had to do some
hunting around to find out what it was (for others' reference:
http://docbook2x.sourceforge.net/).

I'm posting to this mailing list because the error originates in the libxml2 source.

What version of libxml2 are you building against? On Windows or Linux or
...?


There is this source file "ext.c" in docbook2x that includes "hash.h", which in turn includes the 
"parser.h" header file.

At attempting to compile, I get the following error:

In file included from hash.h:22,
                 from ext.c:19:
parser.h:265: parse error before "xmlHashTablePtr"
parser.h:265: warning: no semicolon at end of struct or union
parser.h:266: warning: data definition has no type or storage class
parser.h:283: parse error before '}' token

When I tracked back the definition of "xmlHashTablePtr", I noticed that it derives from "struct 
_xmlHashTablePtr" which is defined
in "hash.c".

Now I'm wondering how I can possibly compile docbook2x if data structures are defined in a source file (as 
opposed to header file),
seeing as there are no *.c files in the include directories?

You can define pointers to structures even though the structure
definition is not available. A pointer is the same size, no matter what
it points to. This is a typical way to define an opaque pointer.

The error you are seeing does not necessarily come from the libxml2 code
-- it could just be that the compiler managed to stumble on to that
point before its parser finally decided it could not recover any
further. Given the lack of other reports about compilation failures like
this, I suspect docbook2x. This may be clarified when you tell us the
version of libxml2 you are building against.

Cheers,
Malcolm



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]