i downloaded mlpack and its dependencies from ubuntu repos as described in the docs using :
sudo apt-get install libmlpack-dev libmlpack-bin
and then i ran :
pkg-config --cflags mlpack
And pkg-config --libs mlpack
And pkg-config --modversion mlpack
to make sure everything works and i got the expected outputs. Now in codeblocks i put the mlpack library directory in the search directory and the pkg-config --cflags mlpack in the compiler options, and the pkg-config --libs mlpack in the linker options. But when i build it gives me ld errors: libraries were not found. What frustrates me is that i have done the exact same procedure with other C++ libraries like OpenCV and it worked. So any help ? Does anyone managed to get it work before on linux ?
------Update------
I managed to fix it by only adding -lmlpack and -larmadillo to the linker options and not adding all --libs.