title: Undefined reference to in AVR-GCC
body: <p>My main.c is as below </p>
  
  <pre><code>#include &lt;avr/io.h&gt;
  #include&lt;avr/interrupt.h&gt;
  #include&lt;util/delay.h&gt;
  #include &lt;string.h&gt;
  #include "main.h"
  #include "globle.h"
  #include "LCD.h"
  
  int  main()
  
  {
  
  ...
  ...
  ...
  
  lcdInit(0xc0);
  lcdScreen(0);
  .
  .
  .
  
  
  return 0; 
  
  }
  </code></pre>
  
  <p>The definition of  lcdInit(0xc0);  and lcdScreen(0); is in my lcd.c file
  and I have a header  file lcd.h  having the following lines:</p>
  
  <pre><code>void lcdInit(char);
  void lcdScreen(char);
  </code></pre>
  
  <p>But still I am getting:</p>
  
  <blockquote>
    <p>C:\Documents and Settings\Tanv\My Documents\my_project5\default/../Main.c:95: >undefined >reference to
    `lcdInit'</p>
  </blockquote>
  
  <p>and  </p>
  
  <blockquote>
    <p>C:\Documents and Settings\Tanvr\My
    Documents\my_project5\default/../Main.c:96: undefined reference to
    `lcdScreen'</p>
  </blockquote>
  
  <p>What is wrong here?</p>