Thanks for the ideas, I've tried commenting out the other includes, and reinstalled the compiler xc8, and creating a new project outside of the dropbox.
After this it still did not work.
I then tried the minimum code, and it worked. Created a new project, and added a new c main file (MPLAB IDE options) and got this file:
#include <xc.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv) {
return (EXIT_SUCCESS);
}
(This is from MPLAB, not sure where it would return that badboy to!) Anyway, it is compiling now ok:
CLEAN SUCCESSFUL (total time: 56ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory '/Users/mollyandchloe/Dropbox/MPLABXProjects/FRDinC.X'
make -f nbproject/Makefile-default.mk dist/default/production/FRDinC.X.production.hex
make[2]: Entering directory '/Users/mollyandchloe/Dropbox/MPLABXProjects/FRDinC.X'
"/Applications/microchip/xc8/v1.42/bin/xc8" --pass1 --chip=16LF18346 -Q -G --double=24 --float=24 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/frdmain.p1 frdmain.c
"/Applications/microchip/xc8/v1.42/bin/xc8" --chip=16LF18346 -G -mdist/default/production/FRDinC.X.production.map --double=24 --float=24 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --memorysummary dist/default/production/memoryfile.xml -odist/default/production/FRDinC.X.production.elf build/default/production/frdmain.p1
Microchip MPLAB XC8 C Compiler (Free Mode) V1.42
Build date: Apr 12 2017
Part Support Version: 1.42
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration
:: warning: (1273) Omniscient Code Generation not available in Free mode
Memory Summary:
Program space used 7h ( 7) of 4000h words ( 0.0%)
Data space used 6h ( 6) of 800h bytes ( 0.3%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Data stack space used 0h ( 0) of 7F0h bytes ( 0.0%)
Configuration bits used 0h ( 0) of 4h words ( 0.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)
You have compiled in FREE mode.
Using Omniscient Code Generation that is available in PRO mode,
you could have produced up to 60% smaller and 400% faster code.
See http://www.microchip.com/MPLABXCcompilers for more information.
make[2]: Leaving directory '/Users/mollyandchloe/Dropbox/MPLABXProjects/FRDinC.X'
make[1]: Leaving directory '/Users/mollyandchloe/Dropbox/MPLABXProjects/FRDinC.X'
BUILD SUCCESSFUL (total time: 1s)
Loading code from /Users/mollyandchloe/Dropbox/MPLABXProjects/FRDinC.X/dist/default/production/FRDinC.X.production.hex...
Loading completed
Not sure what happened! Thanks for the help.