Error with IR recievers

I had begun a project, about a week ago, that involved receiving simple on/off codes from television remotes. My goal of a completed project was to learn the fundamentals and knowledge of short range IR communication.
Prior to this post I was engaged on the use of this sketch. I benefited from a number of different websites such as Ken Sheriff’s blog and a number of forum posts. My resulted code was

#include <NECIRrcv.h>
#define IRPIN 4    // pin that IR detector is connected to

NECIRrcv ir(IRPIN) ;

void setup()
{
  Serial.begin(9600) ;
  Serial.println("NEC IR code reception") ;
  ir.begin() ;
}

void loop()
{
  unsigned long ircode ;
  
  while (ir.available()) {
    ircode = ir.read() ;
    Serial.print("got code: 0x") ;
    Serial.println(ircode,HEX) ;
  }
}

When compiled I receive this error message error: 'byte' does not name a type

Any help would be appreciated, thanks in advance.

When compiled I receive this error message

You want part of an answer? If not, don't post part of an error message.

/

You want part of an answer? If not, don't post part of an error message.

I guess I didn't include the entire error message. I searched many online sites, but could not find an explanation that fitted my exact need. Thx again

In file included from ir communication.ino:3: C:\Users\Home\Documents\Arduino\libraries\NECIRrcv/NECIRrcv.h:4:24: error: WConstants.h: No such file or directory In file included from radio_communication.ino:3: C:\Users\Home\Documents\Arduino\libraries\NECIRrcv/NECIRrcv.h:78: error: 'byte' does not name a type C:\Users\Home\Documents\Arduino\libraries\NECIRrcv/NECIRrcv.h:79: error: 'byte' does not name a type C:\Users\Home\Documents\Arduino\libraries\NECIRrcv/NECIRrcv.h:80: error: 'byte' does not name a type C:\Users\Home\Documents\Arduino\libraries\NECIRrcv/NECIRrcv.h:81: error: 'byte' does not name a type C:\Users\Home\Documents\Arduino\libraries\NECIRrcv/NECIRrcv.h:82: error: 'byte' does not name a type C:\Users\Home\Documents\Arduino\libraries\NECIRrcv/NECIRrcv.h:83: error: 'byte' does not name a type C:\Users\Home\Documents\Arduino\libraries\NECIRrcv/NECIRrcv.h:84: error: 'byte' does not name a type

And what about this part of the error message?

C:\Users\Home\Documents\Arduino\libraries\NECIRrcv/NECIRrcv.h:4:24: error: WConstants.h: No such file or directory In file included from radio_communication.ino:3:

Where is this file?

luisilva: And what about this part of the error message?

C:\Users\Home\Documents\Arduino\libraries\NECIRrcv/NECIRrcv.h:4:24: error: WConstants.h: No such file or directory In file included from radio_communication.ino:3:

Where is this file?

It doesn't exist after 1.0.

OP, the library you are trying to use has not been updated for post 1.0 use. You need to edit the file NECIRrcv.h and change WConstants to Arduino.