Are you adding a new file to the project and adding that code? If so, you have two main functions, giving you a Duplicate Symbol error. A C program can't have two main functions. Remove the main function in the main.c file that was created when you created the project.
When you create a command-line tool project, Xcode provides a main.c file. Why are you creating another file instead of using the main function Xcode created for you.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: