``` #include <libxml/HTMLparser.h> #include <libxml++/libxml++.h> #include <string> int main(void) { std::string text = "BLABLA"; xmlDoc* doc = htmlReadDoc((xmlChar*)text.c_str(), NULL, NULL, HTML_PARSE_RECOVER | HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING); // Encapsulate raw libxml document in a libxml++ wrapper xmlpp::Document doc1(doc); return 0; } ``` compile as: g++ -o test test.cpp $(pkg-config --cflags libxml++-5.0) $(pkg-config --libs libxml++-5.0) ./test segfaults