I downloaded your zip file.
For whatever reason, the printf line came through with '?' instead of " when I made them quotes: printf("\n\rThe ADC Value is: %i ",ADCC_GetSingleConversion(channel_ANA4));
It built just fine - no errors at all. Of course I get a ton of warnings:
-Wl,--defsym=__MPLAB_BUILD=1 -fno-short-double -fno-short-float -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -Wa,-a -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -std=c99 -gdwarf-3 -mstack=compiled:auto:auto -Wl,--memorysummary,dist/default/production/memoryfile.xml -o dist/default/production/adc.production.elf build/default/production/mcc_generated_files/adcc.p1 build/default/production/mcc_generated_files/eusart1.p1 build/default/production/mcc_generated_files/device_config.p1 build/default/production/mcc_generated_files/mcc.p1 build/default/production/mcc_generated_files/pin_manager.p1 build/default/production/main.p1
mcc_generated_files/adcc.c:114:: warning: (520) function "_ADCC_StartConversion" is never called
mcc_generated_files/adcc.c:126:: warning: (520) function "_ADCC_IsConversionDone" is never called
mcc_generated_files/adcc.c:132:: warning: (520) function "_ADCC_GetConversionResult" is never called
mcc_generated_files/adcc.c:163:: warning: (520) function "_ADCC_StopConversion" is never called
mcc_generated_files/adcc.c:169:: warning: (520) function "_ADCC_SetStopOnInterrupt" is never called
mcc_generated_files/adcc.c:175:: warning: (520) function "_ADCC_DischargeSampleCapacitor" is never called
mcc_generated_files/adcc.c:181:: warning: (520) function "_ADCC_LoadAcquisitionRegister" is never called
mcc_generated_files/adcc.c:188:: warning: (520) function "_ADCC_SetPrechargeTime" is never called
mcc_generated_files/adcc.c:195:: warning: (520) function "_ADCC_SetRepeatCount" is never called
mcc_generated_files/adcc.c:201:: warning: (520) function "_ADCC_GetCurrentCountofConversions" is never called
mcc_generated_files/adcc.c:207:: warning: (520) function "_ADCC_ClearAccumulator" is never called
mcc_generated_files/adcc.c:213:: warning: (520) function "_ADCC_GetAccumulatorValue" is never called
mcc_generated_files/adcc.c:219:: warning: (520) function "_ADCC_HasAccumulatorOverflowed" is never called
mcc_generated_files/adcc.c:225:: warning: (520) function "_ADCC_GetFilterValue" is never called
mcc_generated_files/adcc.c:231:: warning: (520) function "_ADCC_GetPreviousResult" is never called
mcc_generated_files/adcc.c:237:: warning: (520) function "_ADCC_DefineSetPoint" is never called
mcc_generated_files/adcc.c:244:: warning: (520) function "_ADCC_SetUpperThreshold" is never called
mcc_generated_files/adcc.c:251:: warning: (520) function "_ADCC_SetLowerThreshold" is never called
mcc_generated_files/adcc.c:258:: warning: (520) function "_ADCC_GetErrorCalculation" is never called
mcc_generated_files/adcc.c:264:: warning: (520) function "_ADCC_EnableDoubleSampling" is never called
mcc_generated_files/adcc.c:270:: warning: (520) function "_ADCC_EnableContinuousConversion" is never called
mcc_generated_files/adcc.c:276:: warning: (520) function "_ADCC_DisableContinuousConversion" is never called
mcc_generated_files/adcc.c:282:: warning: (520) function "_ADCC_HasErrorCrossedUpperThreshold" is never called
mcc_generated_files/adcc.c:288:: warning: (520) function "_ADCC_HasErrorCrossedLowerThreshold" is never called
mcc_generated_files/adcc.c:294:: warning: (520) function "_ADCC_GetConversionStageStatus" is never called
mcc_generated_files/eusart1.c:93:: warning: (520) function "_EUSART1_is_tx_ready" is never called
mcc_generated_files/eusart1.c:98:: warning: (520) function "_EUSART1_is_rx_ready" is never called
mcc_generated_files/eusart1.c:103:: warning: (520) function "_EUSART1_is_tx_done" is never called
mcc_generated_files/eusart1.c:108:: warning: (520) function "_EUSART1_get_last_status" is never called
mcc_generated_files/eusart1.c:112:: warning: (520) function "_EUSART1_Read" is never called
mcc_generated_files/eusart1.c:140:: warning: (520) function "_getch" is never called
C:\Program Files (x86)\Microchip\xc8\v2.05\pic\sources\c99\common\nf_fputc.c:16:: warning: (1498) pointer (unknown) in expression may have no targets
But those seem legitimate as you are not calling those routines. The last warning (pointer) is probably a C99 issue.
Now, all that was with 5.15...I will dl 5.20 and let you know if it is different.
Edit: Finished installing 5.20, no difference although it gave me a configuration defaut error when MPLABXIDE loaded, which was resolved simply by specifying or re-specifying the compiler (c in the tool chain xc8 2.05).
be80be Are you getting errors or warnings? Also, I don't see where you are defining POT