title: Why do I get a linker error while I try to compile a C file?
body: <p>I've had this error for weeks I already made a post about it but it wasn't very clear.<br/>
  So I am calling a function from a a header file myBmpGris.h and the functions are implemented on the file myBmpGris.c . Here is my main file:<br/></p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  #include "myBmpGris.h"
  
  int main(){
  
      char * image_name = "image_carre.bmp";
      BmpImg image = readBmpImage(image_name);
  
   return 0;
  </code></pre>
  
  <p><br/>
  I compile by using <code>ggc main.c</code> and I get this error message :<br/></p>
  
  <blockquote>
    <p>Undefined symbols for architecture x86_64:<br/>
    "_readBmpImage", referenced from:<br/>
          _main in main-1c453a.o<br/>
    ld: symbol(s) not found for architecture x86_64<br/>
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    <br/></p>
  </blockquote>
  
  <p>I read a lot of posts about the same error message but none of the answers seem to apply to my case. I'm kind of desperate because a lot of my programs give me the same error. What should I do ?</p>