They are defined but only in so much that there is an SI defined link between $1\,\rm kg \leftrightarrow 1000\,g$ and $1\, \rm m \leftrightarrow 100\,cm$.
For example, $1\,\rm J = 1\,kg\,m\,s^{-2} = 1\,(1000\,\rm g)\cdot(100\,cm)\cdot(1\,s^{-2}) = 10^5\,g\,cm\,s^{-2} =10^5\,dyne$.
However these two units are no longer a recognised part of the SI family of units although they are still used in various branches of science and engineering, eg Are ergs commonly used in astrophysics? If so, is there a specific reason for it?.