Problem with compile project

OP says they're a novice and that doesn't look like novice code to me, so I'm going to guess that OP lifted that code from somewhere / someone. It might be an idea to contact that someone and ask them for help?