Re: [xml] IN_LIBXML define



Hello.

Probably more of a thing for Igor, but compiling libxml 2.4.13 in VC++ 6
issues warnings that IN_LIBXML is multiply defined.

This is because IN_LIBXML is now defined in libxml.h (new to this
version),
but is still defined in the project settings that determine the parameters
for the compiler.
To get round this you could either put a #ifndef IN_LIBXML ... #endif
guard
around the define, or remove the definition from the libxml2 project
setting.

I suspect Igor might have a nicer solution when he gets the new version.

Yes, yes, I am being senile these days. I posted the threading #defines
thing few days ago and totally forgot to post other changes.

This IN_LIBXML thing should be defined at all times when compiling libxml2,
never when compiling any client code. A proper place would then be the
compiler's -D switch and the project file or the makefile takes care of
that.

The presence of #define IN_LIBXML in libxml.h is therefore a mistake. I
cannot remember any posts regarding this, a search in the archives reveals
nothing. I tend to think that I did it for some test reason, who knows, then
failed to remove it and it propagated into the next diff.

If I am not missing something, I would have my next diff for libxml.h remove
it.

Ciao
Igor




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