How to use external libraries in CLion
Did you add your libraries to the cmake files?

I don't have any experience with CLion but undefined reference normally means that 
the linker couldn't find the function/class your are using.

So make sure the libraries are compiled and the linker knows where to find the object files.