{"action":"created","issue":{"url":"https://api.github.com/repos/mlpack/mlpack/issues/441","labels_url":"https://api.github.com/repos/mlpack/mlpack/issues/441/labels{/name}","comments_url":"https://api.github.com/repos/mlpack/mlpack/issues/441/comments","events_url":"https://api.github.com/repos/mlpack/mlpack/issues/441/events","html_url":"https://github.com/mlpack/mlpack/issues/441","id":85397097,"number":441,"title":"Problem Linking MLPACK on Mac","user":{"login":"emmanuj","id":340027,"avatar_url":"https://avatars.githubusercontent.com/u/340027?v=3","gravatar_id":"","url":"https://api.github.com/users/emmanuj","html_url":"https://github.com/emmanuj","followers_url":"https://api.github.com/users/emmanuj/followers","following_url":"https://api.github.com/users/emmanuj/following{/other_user}","gists_url":"https://api.github.com/users/emmanuj/gists{/gist_id}","starred_url":"https://api.github.com/users/emmanuj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmanuj/subscriptions","organizations_url":"https://api.github.com/users/emmanuj/orgs","repos_url":"https://api.github.com/users/emmanuj/repos","events_url":"https://api.github.com/users/emmanuj/events{/privacy}","received_events_url":"https://api.github.com/users/emmanuj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-05T03:05:36Z","updated_at":"2015-06-14T22:50:34Z","closed_at":"2015-06-14T22:50:34Z","body":"I'm trying to use the kmeans module. Below is the example source and the error I get:\r\n\r\n\t\tusing namespace mlpack::kmeans;\r\n\t\tusing namespace mlpack::metric;\r\n\t\t// The dataset we are clustering.\r\n\t\tarma::mat data(1, edges.size());\r\n\t\tint col =0;\r\n\t\tfor(Edge& e: edges){\r\n\t\t\t//std::cout<<e<<std::endl;\r\n\t\t\tdata(0,col) = e.weight;\r\n\t\t\tcol++;\r\n\t\t}\r\n\t\t\r\n\t\t// The number of clusters we are getting.\r\n\t\tsize_t clusters = 5;\r\n\t\t// The centroids will be stored in this matrix.\r\n\t\t\r\n\t\t\r\n\t\t// The assignments will be stored in this vector.\r\n\t\tarma::Col<size_t> assignments;\r\n\r\n\t\t// Initialize with the default arguments.\r\n\t\t//KMeans<SquaredEuclideanDistance,RefinedStart, MaxVarianceNewCluster> k;\r\n\t\tKMeans<> k;\r\n\t\t//RefinedStart k;\r\n\t\tk.Cluster(data, clusters, assignments);\r\n\r\n\t\tfor(int i =0;i<edges.size();i++){\r\n\t\t\tstd::cout<<edges[i].weight<<\" \"<<assignments(i)<<std::endl;\r\n\t\t}\r\n\r\nAnd I get the following linker error:\r\n\r\n    Undefined symbols for architecture x86_64:\r\n    \"mlpack::util::PrefixedOutStream::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)       (std::basic_ostream<char, std::char_traits<char> >&))\", referenced from:\r\n      Graph::sparsifyGraph()      in graph.o\r\n    ld: symbol(s) not found for architecture x86_64\r\n    collect2: error: ld returned 1 exit status\r\n    make: *** [run] Error 1    \r\n\r\nI get the same error whether I install mlpack with homebrew or from source. I'm using a Macbook pro with OSX 10.10 Yosemite.\r\n\r\nAny help would be appreciated."},"comment":{"url":"https://api.github.com/repos/mlpack/mlpack/issues/comments/111882119","html_url":"https://github.com/mlpack/mlpack/issues/441#issuecomment-111882119","issue_url":"https://api.github.com/repos/mlpack/mlpack/issues/441","id":111882119,"user":{"login":"rcurtin","id":1845039,"avatar_url":"https://avatars.githubusercontent.com/u/1845039?v=3","gravatar_id":"","url":"https://api.github.com/users/rcurtin","html_url":"https://github.com/rcurtin","followers_url":"https://api.github.com/users/rcurtin/followers","following_url":"https://api.github.com/users/rcurtin/following{/other_user}","gists_url":"https://api.github.com/users/rcurtin/gists{/gist_id}","starred_url":"https://api.github.com/users/rcurtin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcurtin/subscriptions","organizations_url":"https://api.github.com/users/rcurtin/orgs","repos_url":"https://api.github.com/users/rcurtin/repos","events_url":"https://api.github.com/users/rcurtin/events{/privacy}","received_events_url":"https://api.github.com/users/rcurtin/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T22:50:34Z","updated_at":"2015-06-14T22:50:34Z","body":"So I don't have a Mac on which to try to reproduce this, but I do have an idea, at least.\r\n\r\nemmanuj: is the compiler being used to compile mlpack the same as the compiler being used to compile your k-means program? (i.e. did you compile mlpack with g++-mp-4.8?)\r\n\r\n"}}