Meaning of each of the arguments is:
-lm enables linking of the standard math library-lstdc++ enables linking of the standard c++ library-static means do not link against shared libraries