Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7573129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:06:12+00:00 2026-05-30T16:06:12+00:00

I try to use htmlcxx to parse a webpage. The problem is, the example

  • 0

I try to use htmlcxx to parse a webpage. The problem is, the example isn’t compileable .

I am getting this when I run g++ webscrsp.cpp:

/tmp/ccHiUM6o.o: In function `main':
webscrsp.cpp:(.text+0x86): undefined reference to `htmlcxx::HTML::ParserSax::parse(std::basic_string, std::allocator > const&)'
webscrsp.cpp:(.text+0xb8): undefined reference to `htmlcxx::HTML::operator >&, tree > > const&)'
/tmp/ccHiUM6o.o: In function `htmlcxx::HTML::ParserDom::ParserDom()':
webscrsp.cpp:(.text._ZN7htmlcxx4HTML9ParserDomC1Ev[htmlcxx::HTML::ParserDom::ParserDom()]+0x22): undefined reference to `vtable for htmlcxx::HTML::ParserDom'
/tmp/ccHiUM6o.o: In function `htmlcxx::HTML::ParserDom::~ParserDom()':
webscrsp.cpp:(.text._ZN7htmlcxx4HTML9ParserDomD1Ev[htmlcxx::HTML::ParserDom::~ParserDom()]+0x16): undefined reference to `vtable for htmlcxx::HTML::ParserDom'
collect2: ld returned 1 exit status

my code is

    #include <string>
    #include <iostream>
    #include <sstream>
    #include </home/lubhavan/htmlcxx-0.84/html/ParserDom.h>
    using namespace std;
    using namespace htmlcxx;

    int main()
    {
      string html ="<html > <head> <title > hi  iam  titile </title> </head> <body> <p>               what  can i do </p> </body> </html>";
    HTML::ParserDom parser;
     tree<HTML::Node> dom = parser.parseTree(html) ;
     cout << dom <<endl;

     cout << endl;
     return 0;
     }

Please help me as I have to do it very soon. I am unable to get the fault …

Thanks in advance ..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:06:13+00:00Added an answer on May 30, 2026 at 4:06 pm

    If your entire command line is

    g++ webscrsp.cpp 
    

    then you will get linker error because you don’t link with the library which contain the actual code.

    You have to do something like this:

    g++ webscrsp.cpp -L/path/to/library -Wl,-rpath=/path/to/library -lname_of_library
    

    In the above command line example, /path/to/library is the path to a file named libXXX.a, where XXX is the name_of_library.

    In your case, you should look somewhere in /home/lubhavan/htmlcxx-0.84/ to find a file that starts with lib and ends in .a. The /path/to/library is the path where that file is. The name_of_library is the name of the file without the leading lib and trailing .a.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i try to use htmlcxx to parse a webpage. The problem is, the example
I try to use doctest from example from http://docs.python.org/library/doctest.html But when I run python
I try to use this code for toggling text on the link: var showText=<span>Open</span>
I try to use the winDBG to debug a dump file. When I run
I try to use this mapping : @Entity @Table(name=ecc.\RATE\) @Inheritance(strategy=InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name=DISCRIMINATOR, discriminatorType= DiscriminatorType.STRING) public
I have a problem with Automapper when I try use custom resolver which uses
I try to use grep to match a case like this: I have a
Hi i try use Nlog in with caliburn micro, I have use this tutorial
how to generate random number in this code? I try use $RANDOM, but the
I need tree file at my asp.net site. For getting icons I try use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.