title: HTML Parser for C
body: <p>I am looking for an easy to use html parser library. Currently I am trying to setup libxml2 but am running into frustrating problems. The IDE I am using is Pelles C, I took the windows files for libxml2 and put them in the appropriate folders (headers in the correct header area, binaries in bin, libs in libraries etc.) but still whenever I try to compile a program the compiler just tells me that every libxml2 function I call is undefined. For example:</p>
  
  <p>Linker Flags: </p>
  
  <p><code>-subsystem:console -machine:amd64 kernel32.lib advapi32.lib delayimp64.lib Ws2_32.lib libxml2.lib</code></p>
  
  <p>Code: </p>
  
  <pre><code>static void print_element_names(xmlNode * a_node)
  {
  xmlNode *cur_node = NULL;
  
  for(cur_node = a_node; cur_node; cur_node = cur_node-&gt;next) 
  {
      if (cur_node-&gt;type == XML_ELEMENT_NODE) 
      {
          printf("node type: Element, name: %s\n", cur_node-&gt;name);
      }
      print_element_names(cur_node-&gt;children);
  }
  }
  
  int main(void)
  {
  xmlDoc *doc = NULL;
  xmlNode *root_element = NULL;
  
  LIBXML_TEST_VERSION
  doc = xmlReadFile("XMLFILE"/*XML_FILE PUT HERE*/, NULL, 0);
  if (doc != NULL) printf("error: could not parse file");
  root_element = xmlDocGetRootElement(doc);
  print_element_names(root_element);
  xmlFreeDoc(doc);
  xmlCleanupParser();
  
  return 0;
  }
  </code></pre>
  
  <p>just gives me the following errors when trying to compile: </p>
  
  <pre><code>POLINK: error: Unresolved external symbol 'xmlCheckVersion'.
  POLINK: error: Unresolved external symbol 'xmlReadFile'.
  POLINK: error: Unresolved external symbol 'xmlDocGetRootElement'.
  POLINK: error: Unresolved external symbol 'xmlFreeDoc'.
  POLINK: error: Unresolved external symbol 'xmlCleanupParser'.
  POLINK: fatal error: 5 unresolved external(s).
  </code></pre>
  
  <p>this whole situation is driving me insane, if anybody could help me resolve this issue or perhaps suggest an easier to setup html parser I would immensely appreciate it.</p>