title: Use start_function from another source file when creating a pthread
body: <p>In my main() method in one source file, I have a call to pthread_create(), as follows:</p>
  
  <pre><code>pthread_t pth_chanrecv;
  pthread_create(&amp;pth_chanrecv, NULL, chanrecv_run, NULL);
  </code></pre>
  
  <p>"chanrecv_run" is a function in another source file that I have written.<br>
  This is the function prototype:</p>
  
  <pre><code>void *chanrecv_run(void *arg);
  </code></pre>
  
  <p>The function prototype is in a header file which I have included in the source file containing the main() method.</p>
  
  <p>I'm compiling my program with the following statement:</p>
  
  <pre><code>gcc -lpthread -o bin/main2 src/main2.c
  </code></pre>
  
  <p>The chanrecv_run() function is in a file named "chanrecv.c", also in the src folder.</p>
  
  <p>Every time I try and compile it, I get the following error:</p>
  
  <pre><code>/tmp/ccHxRSTk.o: In function `main':
  main2.c:(.text+0x256): undefined reference to `chanrecv_run'
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>I have no idea what's going wrong. I've scoured the web trying to find another instance of someone trying to call a function that was in another file with the pthread_create function and come up completely blank. Is this even possible, and if so, how?</p>