Error: PIN_B0 undeclared in XC16
The implicit declaration warning for output_low means that the C compiler can't find a function definition for output_low: either you didn't write the code for it, or you didn't #include in some external code/macro/library to define what that function actually is.

The error for PIN_B0 is similar: the C compiler doesn't know what PIN_B0 is. Meaning, it's not a variable or a #define anywhere in your program.

For XC16, the SFRs and ports are defined in device-specific headers, found in the \support folder under the specific device family (PIC24, dsPIC33, and so on) - see \support\PIC24F\h\p24fj64gb002.h for your specific part.

You will need to #include &lt;xc.h&gt; to get those definitions showing up nicely in your workspace - after which you may use TRISBbits.TRISB0 to set the mode (in or out), PORTBbits.RB0 to read from the line and LATBbits.LATB0 to write to the line.