g++-4.8 arma_example.cpp -o arma_example -O3 -larmadillo -std=c++11 -Wall -fno-rtti -Wa,-q -march=native
-march=native
doesn't work on osx because of outdated as
.
-q
Use the clang(1) integrated assembler instead of the GNU based system assembler.