Converting code from Arduino to PIC

pert:
I thought of that too but then saw the Wikipedia article for MPLAB said it does support C++ for PIC32.

You are right I found a C++ compiler here;

That will certainly help.

I suspect one of the problems will be that the code will have been developed specifically to run on Arduinos and without any thought of changing platforms. In other words access to the Arduino structure is probably peppered throughout the code rather than trying to isolate it in specific functions.

Some metrics on the number of lines of code, number of functions, amount of memory and I/O used etc. might give a bit of a handle on the scale of the problem.