title: How do I compile with external header file in sublime text in C?
body: <p>I use one header named <code>header.h</code> in <code>main.c</code>. 
  The function test is announced in <code>header.h</code> and defined in <code>test.c</code>.
  However, it says words below even though I use build system as C.</p>
  
  <pre><code>clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
  Undefined symbols for architecture x86_64:
    "test(int)", referenced from:
    _main in main-a4d82e.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  [Finished in 0.6s with exit code 1]
  [cmd: ['bash', '-c', 'g++ -Wall -std=c++11 -O2 \'/Users/hanlock/Documents/CODE/TEST/TEST/main.c\' -o \'/Users/hanlock/Documents/CODE/TEST/TEST/main\' &amp;&amp; osascript -e \'tell application "Terminal" to activate do script " cd \\"/Users/hanlock/Documents/CODE/TEST/TEST\\" &amp;&amp;start_ms=$(ruby -e \\"puts (Time.now.to_f * 1000).to_i\\")&amp;&amp;clear&amp;&amp;\\"/Users/hanlock/Documents/CODE/TEST/TEST/main\\" &amp;&amp;elapsed_ms=$(($(ruby -e \\"puts (Time.now.to_f * 1000).to_i\\") - start_ms))&amp;&amp; read -p \\"Press Enter to exit($elapsed_ms ms).\\"&amp;&amp;exit"\'']]
  [dir: /Users/hanlock/Documents/CODE/TEST/TEST]
  [path: /usr/bin:/bin:/usr/sbin:/sbin]
  </code></pre>
  
  <p>I've read similar questions about this in C++. However, it seems not working in my case.
  So, here comes the problem. How can I use external header file with sublime in language C?</p>
  
  <p>Here is the code:</p>
  
  <p>main.c</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include "./Header.h"
  int main(int argc, const char * argv[]) {
      test(1);
      return 0;
  }
  </code></pre>
  
  <p>header.h</p>
  
  <pre><code>#ifndef Header_h
  #define Header_h
  int test(int);
  #endif
  </code></pre>
  
  <p>test.c</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int test(int i){
      printf("%d\n",i);
      return 0;
  }
  </code></pre>