Missing an import inside a method (undefined reference)