When using the armadillo C++ library I need to compile with g++ flag -larmadillo to link the run-time armadillo library. If not, I get
armadillo
g++
-larmadillo