Building a program giving me error messages