title: Duplicate symbol error when linking C code
body: <p>I am trying to use some functions that are written in C. However I am getting the following error message:</p>
  
  <pre><code>duplicate symbol _getInt in:
      /Users/&lt;redacted&gt;/Library/Developer/Xcode/DerivedData/Test-ecbrpcljzanjildnvawnrcgejdwn/Build/Intermediates/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/x86_64/source.o
      /Users/&lt;redacted&gt;/Library/Developer/Xcode/DerivedData/Test-ecbrpcljzanjildnvawnrcgejdwn/Build/Intermediates/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/x86_64/swift.o
      ld: 1 duplicate symbol for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>swift.swift:</p>
  
  <pre><code>print(getInt())
  </code></pre>
  
  <p>header.h:</p>
  
  <pre><code>#ifndef header_h_
  #define header_h_
  #include "source.c"
  #endif
  </code></pre>
  
  <p>source.c:</p>
  
  <pre><code>int getInt() {
      return 4;
  }
  </code></pre>
  
  <p>These are my bridging header settings
  <a href="https://i.stack.imgur.com/r52rb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r52rb.png" alt="enter image description here"></a></p>