title: clang: error: linker command failed with exit code 1 (use -v to see invocation) Xcode
body: <p>I've been new to xCode and facing this issue while adding a new file to existing project. The error I receive is :</p>
  
  <blockquote>
    <p>duplicate symbol _main in:
        /Users/jagtapawan/Library/Developer/Xcode/DerivedData/pdf-gowwoupvsiukblehcdbaeublehki/Build/Intermediates/pdf.build/Debug/pdf.build/Objects-normal/x86_64/main.o
        /Users/jagtapawan/Library/Developer/Xcode/DerivedData/pdf-gowwoupvsiukblehcdbaeublehki/Build/Intermediates/pdf.build/Debug/pdf.build/Objects-normal/x86_64/func.o
    ld: 1 duplicate symbol for architecture x86_64 clang: error: linker
    command failed with exit code 1 (use -v to see invocation)</p>
  </blockquote>
  
  <p>what I do is File -> New -> File. on the left panel select iOS source -> objective c -> next. It insists me to to enter </p>
  
  <p>File: func</p>
  
  <p>File type : Empty</p>
  
  <p>Class : NSObject</p>
  
  <p>my file hierarchy in Xcode is this way :</p>
  
  <p>pdf</p>
  
  <p>-func.m</p>
  
  <p>--pdf</p>
  
  <p>----main.m</p>
  
  <p>--products</p>
  
  <p>----pdf</p>
  
  <p>whereas in finder the func.m and main.m are in the same folder pdf.
  please help me</p>