title: microC build failure due to struct/union required
body: <p>this is my main.c program and there was a build failure due to "struct/union required". I'm using pic 13f877a microcontroller. I'll be really greatful if anyone can tell me the reason for this build failure. also there was another warning saying "36.1 function declared implicit int". what does that mean too?</p>
  
  <pre><code>#include&lt;htc.h&gt;
      #define _XTAL_FREQ 4000000
      __CONFIG(0X3F39);
  
      void main(){
        int a;
        TRISB = 0b00010000;           //RB4 as Input PIN (ECHO)
        TRISC = 0b00000000;           //C as Output PINs (LED)
        T1CON = 0b00010000;           //Initialize Timer Module
  
        while(1){
          TMR1H = 0;                  //Sets the Initial Value of Timer
          TMR1L = 0;                  //Sets the Initial Value of Timer
          PORTC = 0b00000000;
          PORTB.F0 = 1;               //TRIGGER HIGH
          Delay_us(10);               //10uS Delay
          PORTB.F0 = 0;               //TRIGGER LOW
  
          while(!PORTB.F4){           
              T1CON.F0 = 1;
          }               
          while(PORTB.F4){            
              T1CON.F0 = 0;               
          }
  
          a = (TMR1L | (TMR1H&lt;&lt;8));   //Reads Timer Value
          a = a/58;                   //Converts Time to Distance
          a = a + 1;                  //Distance Calibration
          if(a&gt;=2 &amp;&amp; a&lt;=400){
              //with in the range
              PORTC = 0b11111111;
          } else {
              //out of range
              PORTC = 0b00000000;
          }
          Delay_ms(400);
        }
      }
  
  Build C:\Users\user\Desktop\SmartDustbin for device 16F877A
  Using driver C:\Program Files (x86)\HI-TECH Software\PICC\9.81\bin\picc.exe
  
  Make: The target "C:\Users\user\Desktop\main.p1" is out of date.
  Executing: "C:\Program Files (x86)\HI-TECH Software\PICC\9.81\bin\picc.exe" --pass1 C:\Users\user\Desktop\main.c -q --chip=16F877A -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error   [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s" 
  Error   [196] C:\Users\user\Desktop\main.c; 15.10 struct/union required
  Warning [361] C:\Users\user\Desktop\main.c; 16.1 function declared implicit int
  Error   [196] C:\Users\user\Desktop\main.c; 17.10 struct/union required
  Error   [196] C:\Users\user\Desktop\main.c; 19.16 struct/union required
  Error   [196] C:\Users\user\Desktop\main.c; 20.10 struct/union required
  Error   [196] C:\Users\user\Desktop\main.c; 22.15 struct/union required
  Error   [196] C:\Users\user\Desktop\main.c; 23.10 struct/union required
  Warning [361] C:\Users\user\Desktop\main.c; 36.1 function declared implicit int
  
  ********** Build failed! **********
  </code></pre>