Re: [libxml++] Re: different behavior on solaris/x86 and linux/x86 of Document::create_root_node?



Murray Cumming wrote:
On Wed, 2003-08-20 at 22:25, Tim Flechtner wrote:

   xmlpp::Node* nodeRoot = document.create_root_node("exampleroot");
   cout << nodeRoot << endl;


[snip]


which on my solaris x86 box cout's 0, and on linux cout's a valid address.


I would suggest a little debugging, maybe into libxml too. Some code
somewhere is probably purposefully setting a pointer to 0 for some
reason.

my guess would be that there is a problem with the global initializer
object not being created. (that problem was already reported once upon
a time on a windows platform).

Remember that libxml++'s wrapper mechanism is based on a libxml2
callback that has to be initialized first. If it isn't, no
wrappers will ever be created.

The fact that this mechanism is so fragil and not very portable
(or so it seems) made me change the approach on my own libxml2
wrapper...

Hope this helps,
		Stefan








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