<p>I'm trying to use the kmeans module. Below is the example source and the error I get:</p>

<pre><code>    using namespace mlpack::kmeans;
    using namespace mlpack::metric;
    // The dataset we are clustering.
    arma::mat data(1, edges.size());
    int col =0;
    for(Edge&amp; e: edges){
        //std::cout&lt;&lt;e&lt;&lt;std::endl;
        data(0,col) = e.weight;
        col++;
    }

    // The number of clusters we are getting.
    size_t clusters = 5;
    // The centroids will be stored in this matrix.


    // The assignments will be stored in this vector.
    arma::Col&lt;size_t&gt; assignments;

    // Initialize with the default arguments.
    //KMeans&lt;SquaredEuclideanDistance,RefinedStart, MaxVarianceNewCluster&gt; k;
    KMeans&lt;&gt; k;
    //RefinedStart k;
    k.Cluster(data, clusters, assignments);

    for(int i =0;i&lt;edges.size();i++){
        std::cout&lt;&lt;edges[i].weight&lt;&lt;" "&lt;&lt;assignments(i)&lt;&lt;std::endl;
    }
</code></pre>

<p>And I get the following linker error:</p>

<pre><code>Undefined symbols for architecture x86_64:
"mlpack::util::PrefixedOutStream::operator&lt;&lt;(std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;&amp; (*)       (std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;))", referenced from:
  Graph::sparsifyGraph()      in graph.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [run] Error 1    
</code></pre>

<p>I get the same error whether I install mlpack with homebrew or from source. I'm using a Macbook pro with OSX 10.10 Yosemite.</p>

<p>Any help would be appreciated.</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/441">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFCkDW--AIcSiOhZqZ19pDtuFTneGks5oQQmDgaJpZM4E5QzN.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/441"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>