Hi,
I think those problems occurs when Document::Init is not instanciated.
It should be automatic but depending on the platform/linker/compiler it
may not work properly.
Try to declare a global var of type Document::Init.
BTW, I was wondering if making a singleton from Document::Init could
eventually solve this problem. We could make sure it is instanciated in
Parser and Document constructor.
Cheers,
Christophe
kike fernandez a écrit :
>Hello,
>
>I'm trying to use libxml++ in one project but I'm having some problems.
>Our environment is sparc/Solaris 9. Is libxml++ known to work in this
>environment?
>
>We use gcc2.95.3 and the library compiles and installs OK.
>but some of the example programs segfault and others work (using the
>same versions in Linux seems to work ok and libxml2 and libxslt work ok
>in our solaris box)
>
>We are very interested in using libxml++ (we would like to help to find
>and resolve any bugs in libxml++) but I'm relatively new to c++
>programming so I'm sorry if I'm doing something wrong.
>
>
>
>---> dom_build
>
>40 xmlpp::Element* nodeRoot =
>document.create_root_node("exampleroot", "http://foo", "foo");
>//Declares the namespace and uses its prefix for this node
>(gdb) n
>
>Program received signal SIGSEGV, Segmentation fault.
>0xff378f18 in xmlpp::Node::cobj (this=0x0) at node.cc:131
>
>
>---> dom_parse_entities
>
>54 xmlpp::Node::NodeList list = node->get_children();
>(gdb) n
>
>Program received signal SIGSEGV, Segmentation fault.
>xmlpp::Node::get_children (this=0x0, name=@0xffbff5d0) at node.cc:28
>28 xmlNode* child = impl_->children;
>
>---> dom_parser
>
>115 return impl_->name ? (const char*)impl_->name : "";
>(gdb) n
>
>Program terminated with signal SIGSEGV, Segmentation fault.
>The program no longer exists.
>
>
>
>
>
>
|