<p>What you'll need to do is add the include directory <code>/usr/include/libxml2/</code> (I assume this is where Arch puts the libxml2 headers) to the compiler's search path.  From the command-line (using g++ or clang) this is easily accomplishable with <code>-I/usr/include/libxml2/</code>, and then you can link with <code>-lxml2</code>.  If you're using CMake to configure and build your application, then try this snippet:</p>

<pre><code>find_package(LibXml2 2.6.0 REQUIRED)
include_directories(${LIBXML2_INCLUDE_DIR})
</code></pre>

<p>and then when you link your program, add libxml2 to the dependencies:</p>

<pre><code>target_link_libraries(your_program
  ... # Other dependencies...
  ${LIBXML2_LIBRARIES})
</code></pre>

<p>Really this is sort of an unsatisfying solution, and the better solution will be a solution to <a href="https://github.com/mlpack/mlpack/issues/315" class="issue-link" title="Make xml dependency optional">#315</a> (or something like that) that makes the libxml2 dependency entirely internal to libmlpack.so.  But unfortunately this hasn't been done yet, so what I've written above is probably the best answer I can give for now...</p>

<p>Hopefully this is helpful.  If not, let me know, and I can elucidate further...</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/393#issuecomment-71759440">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFEK4PPnVvX3Xsc7SZJCcyJ3gNc2Jks5nmCaTgaJpZM4DYDTN.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/393#issuecomment-71759440"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>