Keil compilation Error: Error: L6218E [How to Solve]

KEIL compiles and reports an error

…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_Cmd (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_DeInit (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_GetCalibrationStatus (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_GetConversionValue (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_GetFlagStatus (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_GetResetCalibrationStatus (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_Init (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_RegularChannelConfig (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_ResetCalibration (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_SoftwareStartConvCmd (referred from adc.o).
…\OBJ\USART.axf: Error: L6218E: Undefined symbol ADC_StartCalibration (referred from adc.o).


Go to Manage Project Items and add adc.c under FWLib, see the picture below for the exact location, I used the project template of Positive Point Atomic, anyway, find the adc.c file and add it in.



After adding and recompiling, no error will be reported

Read More: