title: ld: 1 duplicate symbol for architecture x86_64
body: <p>I'm very very new to C and C++ programming, and have very little experience in Software Programming (my background is Web Based) But I'm trying to experiment with C / C++ and Xcode... So I've found this code (and many similar variations online):</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      printf ("Test");
      return 0;
  }
  </code></pre>
  
  <p>Yet when I come to compile it in Xcode I get the following error: </p>
  
  <pre><code>&gt; duplicate symbol _main in:
  &gt;     /Users/thomas/Library/Developer/Xcode/DerivedData/test-etqojvxbxhxjqeggdzkbfufvbeza/Build/Intermediates/test.build/Debug/test.build/Objects-normal/x86_64/first.o
  &gt;     /Users/thomas/Library/Developer/Xcode/DerivedData/test-etqojvxbxhxjqeggdzkbfufvbeza/Build/Intermediates/test.build/Debug/test.build/Objects-normal/x86_64/main.o
  &gt; ld: 1 duplicate symbol for architecture x86_64 clang: error: linker
  &gt; command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>Maybe Xcode is the wrong thing for me to be using as a newbie? If anyone could recommend a better compiler, that would be great too!</p>