Undeclared functions or undeclared types error