title: How to Use .lib file method in c program on GCC Compiler
body: <p>I have following code:</p>
  
  <p>.Lib file:</p>
  
  <pre><code>contain TRNG_GetRandomData( int *Data, int Size ); Method
  </code></pre>
  
  <p>.H file (header file):</p>
  
  <pre><code>extern void TRNG_GetRandomData( int *Data, int Size );
  </code></pre>
  
  <p>.C code (Source file):</p>
  
  <pre><code>#include&lt;OpenDrivers.h&gt;
  void main()
  {
      int  test[8] ; 
      TRNG_GetRandomData(test,8);
  }
  </code></pre>
  
  <p>and i getting error </p>
  
  <blockquote>
    <p>undefined reference to <code>TRNG_GetRandomData</code></p>
  </blockquote>
  
  <p>Can any one help me solve it?</p>