John, on the page you link, it shows the standard Arduino libraries modified for
the PIC32, plus they've been working on the code as recently as 1 day ago,
#define __LANGUAGE_C__
#define OPT_BOARD_INTERNAL
#include "SPI.h"
extern p32_spi * SPIClass::spi;
extern p32_regset * SPIClass::iec;
extern p32_regset * SPIClass::ifs;
extern int SPIClass::irq;
extern int SPIClass::vec;
SPIClass SPI((p32_spi *) _SPI_BASE, _SPI_ERR_IRQ, _SPI_VECTOR);
//************************************************************************
SPIClass::SPIClass(p32_spi * spiP, int irqP, int vecP)
{
/* Save the pointer to the SPI port and the base IRQ number.
*/
spi = spiP;
irq = irqP;
vec = vecP;
}
.........