It links, because the class is never actually instantiated anywhere, but the code is still wrong. You need to define a body for the function, even if the body was empty.