Adding External Libraries to px4 Master using Qt Creator

First of all, I am relatively new to linux, cmake and make but I know how to program in c++. I am working on writing an attitude controller and my approach requires a lot of matrices and vectors, more than the 4 by 4 specified in the matrix class coded somewhere in the px4 master folder.

I have the library, Armadillo Linear Algebra Library, installed on Qt creator but I have been struggling to link it to the code. I thought that adding '#include ’ to the mc_att_control.cpp would be enough for me to use the functions in the library but now I know that it has to be linked somehow and I do not know what file to look for and also I do not how to go about linking.

It could be something straightforward and maybe my inexperience with make and cmake could be a factor, but I appreciate assistance with figuring this out. Please be as detailed as possible, not to sound like a broken record, I am still getting a hang of cmake.

Thank you so much in advance.

You have to add the library in the right include folder (I don’t know where it is but should be mentioned in the CMakeLists.txt file)