title: Compile all necessary files with gcc
body: <p>I’m quite new to C and the gcc compiler. I have a project where I include some other .h files. In that files there are include from more own .h files. And so on. Its a decent amount of includes.
  My problem is, when I try to compile the main file with:</p>
  <pre><code>gcc -o test tests_main.c
  </code></pre>
  <p>I get the following error:</p>
  <pre><code>Undefined symbols for architecture x86_64:
   &quot;_waves_secure_hash_test&quot;, referenced from:
       _crypto_tests in tests_main-d1ae56.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  <p>Thats because the compiler cant find the method &quot;waves_secure_hash_test&quot;, but its in the included file:</p>
  <pre><code>#include &quot;crypto_tests.h&quot; 
  </code></pre>
  <p>So, I searched a little bit and found a solution, just compile it with:</p>
  <pre><code>gcc -o test tests_main.c crypto_tests.c
  </code></pre>
  <p>Okay, that work for me with that two test file, where the functions are only some test prints.
  For my complete project with a decent amount of includes, I can’t write down all that c files to compile... Is there a way to tell the compiler that he has to compile all needed and included files?</p>