I am working on a PIC24 project, and I went to the project folder and moved a file to another directory inside the project folder, however, I got a makefile error. I created a new project and copied the source codes into the project I still get the same error.
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf make: Entering directory 'C:/Users/forat/MPLABXProjects/SerialComm_2_Micros_2.X' make -f nbproject/Makefile-default.mk dist/default/production/SerialComm_2_Micros_2.X.production.hex make: Entering directory 'C:/Users/forat/MPLABXProjects/SerialComm_2_Micros_2.X' make: *** No rule to make target 'build/default/production/System.o', needed by 'dist/default/production/SerialComm_2_Micros_2.X.production.hex'. Stop. make: *** Waiting for unfinished jobs.... "C:\Program Files\Microchip\xc16\v1.60\bin\xc16-gcc.exe" main.c -o build/default/production/main.o -c -mcpu=24FJ1024GB610 -MMD -MF "build/default/production/main.o.d" -mno-eds-warn -g -omf=elf -DXPRJ_default=default -legacy-libc -O0 -msmart-io=1 -Wall -msfr-warn=off -mdfp="C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/PIC24F-GA-GB_DFP/1.3.109/xc16" make: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 make: Leaving directory 'C:/Users/forat/MPLABXProjects/SerialComm_2_Micros_2.X' nbproject/Makefile-default.mk:91: recipe for target '.build-conf' failed make: Leaving directory 'C:/Users/forat/MPLABXProjects/SerialComm_2_Micros_2.X' nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed BUILD FAILED (exit value 2, total time: 1s)
Can someone help me, into why I got this error, I thought since it is not a syntax error, then if I create a new project and copied and pasted the code, I won't have this error.
I created a test project with a simple c code, and it got built successfully without any issues, it is only with my project that I got this error.
Your help is appreciated.
in the error, it mentions the problem is with
System.o I deleted the file
System.h and created a new one with the same name and copied the code in it, the error disappeared when I build it.
Thank you guys for your help.