<p>I have a similar problem. I built the mlpack.dylib successfully. The test however failed for 4 cases but I ignored. I tried to compile the sample program (<a href="http://www.mlpack.org/doxygen.php?doc=sample.html">http://www.mlpack.org/doxygen.php?doc=sample.html</a>), but it failed at linking state, despite my effort in trying include every path I could think of. Here is the command </p>
<p><code><br>
g++-mp-4.9 lab.cpp -o lab.x -std=c++11 -O3 -I /opt/local/include -I /opt/local/include/eigen3 -I /opt/local/include/armadillo_bits -I /opt/local/include/libxml2 -I /usr/local/include -L ./ -L /opt/local/lib -L /usr/lib -L /usr/local/lib -lmlpack -larmadillo -lxml2 -lblas -llapack<br>
</code></p>
<p>It failed with the note (sorry, I do not know how to paste the error in the correct format)</p>
<p><code><br>
Undefined symbols for architecture x86_64:<br>
"mlpack::util::PrefixedOutStream::operator<<(std::basic_ostream >& (<em>)(std::basic_ostream >&))", referenced from:<br>
bool mlpack::data::Save(std::basic_string, std::allocator > const&, arma::Mat const&, bool, bool) in cc0ZLSpa.o<br>
bool mlpack::data::Load(std::basic_string, std::allocator > const&, arma::Mat&, bool, bool) in cc0ZLSpa.o<br>
"mlpack::util::PrefixedOutStream::operator<<(std::basic_string, std::allocator >&)", referenced from:<br>
bool mlpack::data::Save(std::basic_string, std::allocator > const&, arma::Mat const&, bool, bool) in cc0ZLSpa.o<br>
bool mlpack::data::Load(std::basic_string, std::allocator > const&, arma::Mat&, bool, bool) in cc0ZLSpa.o<br>
"mlpack::Timer::Stop(std::basic_string, std::allocator > const&)", referenced from:<br>
bool mlpack::data::Save(std::basic_string, std::allocator > const&, arma::Mat const&, bool, bool) in cc0ZLSpa.o<br>
bool mlpack::data::Load(std::basic_string, std::allocator > const&, arma::Mat&, bool, bool) in cc0ZLSpa.o<br>
"mlpack::Timer::Start(std::basic_string, std::allocator > const&)", referenced from:<br>
bool mlpack::data::Save(std::basic_string, std::allocator > const&, arma::Mat const&, bool, bool) in cc0ZLSpa.o<br>
bool mlpack::data::Load(std::basic_string, std::allocator > const&, arma::Mat&, bool, bool) in cc0ZLSpa.o<br>
"std::ctype::_M_widen_init() const", referenced from:<br>
bool arma::diskio::load_raw_ascii(arma::Mat&, std::basic_istream >&, std::basic_string, std::allocator >&) in cc0ZLSpa.o<br>
bool arma::diskio::load_csv_ascii(arma::Mat&, std::basic_istream >&, std::basic_string, std::allocator >&) in cc0ZLSpa.o<br>
void mlpack::util::PrefixedOutStream::BaseLogic, std::allocator > >(std::basic_string, std::allocator > const&) in cc0ZLSpa.o<br>
void mlpack::util::PrefixedOutStream::BaseLogic(unsigned long long const&) in cc0ZLSpa.o<br>
"std::__throw_out_of_range_fmt(char const</em>, ...)", referenced from:<br>
void mlpack::util::PrefixedOutStream::BaseLogic, std::allocator > >(std::basic_string, std::allocator > const&) in cc0ZLSpa.o<br>
bool mlpack::data::Save(std::basic_string, std::allocator > const&, arma::Mat const&, bool, bool) in cc0ZLSpa.o<br>
void mlpack::util::PrefixedOutStream::BaseLogic(unsigned long long const&) in cc0ZLSpa.o<br>
bool mlpack::data::Load(std::basic_string, std::allocator > const&, arma::Mat&, bool, bool) in cc0ZLSpa.o<br>
ld: symbol(s) not found for architecture x86_64<br>
collect2: error: ld returned 1 exit status<br>
</code><br>
I'm sure the library is in /usr/local/lib<br>
<code><br>
$ ls /usr/local/lib/libmlpack.<br>
libmlpack.1.0.dylib libmlpack.1.dylib libmlpack.dylib<br>
</code><br>
I am very grateful if you can see a problem in my stuff... Thanks a lot.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/441#issuecomment-111706396">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFI96MJQPAdXDCI29SIon0TLkF7hxks5oTBm_gaJpZM4E5QzN.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#issuecomment-111706396"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>