Compiler issue when activate geofencing output pin

Hi,
I use the arduino V1.0.3 compiler for windows and the last version of ArduPlane V2.78b.
The compilation process works well and I can make the hex file.

In order to toggle an output digital pin when the geofencing is activated, I add this line “#define FENCE_TRIGGERED_PIN 5” in the “APMConfig.h” file.

Unfortunately, a compilation error occurs “geofence.ino:233:50: error: ‘digitalWrite’ was not declared in this scope”.

How can I specify the location of the Arduino core library (…\hardware\arduino\cores\arduino) to the compiler?
Any ideas to solve this problem?

Thank you for your help.

I replaced the digitalWrite function with “hal.gpio->write(FENCE_TRIGGERED_PIN, …”