title: Undefined reference to 'function name'
body: <p>I am a CS student currently trying to learn C. I just started creating my own header files and as a fun little project I wanted to create a library of my own that can handle big integers in a string based way. There are simply three files; bignumbers.h, bignumbers.c, test.c .</p>
  <p>bignumbers.h:</p>
  <pre><code>#ifndef BIGNUMBERS_H
  #define BIGNUMBERS_H
  
  //Typedef Declaration
  typedef struct big_number{
      char digit;
      struct big_number *next_digit;
  } *BIGNUMBER;
  
  
  //Function Declaration
  int number_length(char number[]);
  BIGNUMBER create_digit(char digit);
  BIGNUMBER create_number(char number[]);
  //Macro Declaration
  
  #endif // BIGNUMBERS
  </code></pre>
  <p>bignumbers.c</p>
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  
  //Actual functions
  #include &quot;bignumbers.h&quot;
  int number_length(char number[]){
      /*code to get string length*/
  }
  
  BIGNUMBER create_digit(char digit_){
      BIGNUMBER number_digit;
      number_digit = malloc(sizeof(BIGNUMBER));
  
      if(number_digit == NULL){
          printf(&quot;Memory allocation failed!&quot;);
          exit(EXIT_FAILURE);
      }
  
      number_digit-&gt;digit = digit_;
  }
  
  BIGNUMBER create_number(char number[]){
  }
  </code></pre>
  <p>test.c:</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &quot;bignumbers.h&quot;
  
  int main(){
      number_length(&quot;1&quot;);
  }
  </code></pre>
  <p>Trying to compile test.c gives me an error with the message &quot;undefined reference to 'number_length'
  error: ld returned 1 exit status&quot;</p>
  <p>There is no typo in test.c as far as I'm aware. So what might be the problem here? I understand that &quot;ld returned 1 exit status&quot; is a linker problem but I don't really see what can cause that.</p>