HIDBoot Keyboard compiling error

Using Arduino Uno and IDE 1.06. Trying to compile the following code and I get errors I don't uderstand.

sketch_jan26a2:13: error: 'HID_PROTOCOL_KEYBOARD' was not declared in this scope
sketch_jan26a2:13: error: template argument 1 is invalid
sketch_jan26a2:13: error: invalid type in declaration before '(' token
sketch_jan26a2:13: error: invalid conversion from 'USB*' to 'int'

This code is an example taken from (https://www.circuitsathome.com/mcu/connecting-barcode-scanner-arduino-usb-host-shield/comment-page-2#comments).

It has worked for other people. I don't uderstand why the compiling error. It must have something to do with the libraries but I don't know how to fix it . Please help

#include <avr/pgmspace.h>
 
#include <Usb.h>
#include <usbhub.h>
#include <avr/pgmspace.h>

#include <hidboot.h>

 
USB     Usb;
//USBHub     Hub(&Usb);
HIDBoot <HID_PROTOCOL_KEYBOARD>    Keyboard(&Usb);

Ok solved it.

The problem was in the library. I was using the updated version of date (20-01-2016). Changed it for the old version of 03-01-15 and not it compiles no problem.

I got the same problem but I can't find the old version of host library, could you please help me

thank you

Try upgrading the IDE to 1.6.5 or 1.6.7.