Arduino.h, avr-gcc

Experiencing the same issue, real pity that I cannot get it going either.

Compiling .pio\build\dueUSB\lib90f\ezButton\Button.cpp.o
Compiling .pio\build\dueUSB\lib90f\ezButton\ezButton.cpp.o
Compiling .pio\build\dueUSB\FrameworkArduinoVariant\variant.cpp.o
src\OPTICALencodV2_tests.cpp: In function ‘void PCINT2_vect()’:
src\OPTICALencodV2_tests.cpp:130:28: error: ‘PIND’ was not declared in this scope
portDvalShoulderEncExt = PIND & 0b00001100; // PIND4 PIND3 PIND2 = physical pins digital 2 & 3 & 4
^~~~
src\OPTICALencodV2_tests.cpp:130:28: note: suggested alternative: ‘PIOD’
portDvalShoulderEncExt = PIND & 0b00001100; // PIND4 PIND3 PIND2 = physical pins digital 2 & 3 & 4
^~~~
PIOD
src\OPTICALencodV2_tests.cpp: In function ‘void PCINT0_vect()’:
src\OPTICALencodV2_tests.cpp:161:3: error: ‘cli’ was not declared in this scope
cli();
^~~
src\OPTICALencodV2_tests.cpp:161:3: note: suggested alternative: ‘clz’
cli();
^~~