I made a project with ur file.I produced the .o object.No problem.I commented out the sleep(), call as it was showing undeclared identifier.
I got an *.exe under linux.
Iam new to Linux.I dont know how to run the exe from konsole