Using Keil MDK, I tried an example for STM32F107. After opening and compiling, the compilation succeeded, but the linker indicated that there were 5 functions undeclared. However, upon reviewing the files, it was clear that the header files were included. Why was it still not working?
I also tried using extern declarations, but that did not work either.
Linking issues can be quite troublesome, and the solution I found is:
. exttt{Obj extbackslash STM3210C-EVAL.axf}: Error: L6218E: Undefined symbol LCD_ClearLine (referred from app.o).
. exttt{Obj extbackslash STM3210C-EVAL.axf}: Error: L6218E: Undefined symbol LCD_DisplayChar (referred from app.o).
. exttt{Obj extbackslash STM3210C-EVAL.axf}: Error: L6218E: Undefined symbol LCD_DisplayStringLine (referred from app.o).
. exttt{Obj extbackslash STM3210C-EVAL.axf}: Error: L6218E: Undefined symbol STM_EVAL_LEDToggle (referred from app.o).
. exttt{Obj extbackslash STM3210C-EVAL.axf}: Error: L6218E: Undefined symbol LCD_Clear (referred from bsp.o).
Locate the file containing these functions, then right-click on that file in the project management section of Keil on the left side and select “Options for File ‘xxx.c'”. In the dialog box, check “include in target build” to ensure the checkmark turns black instead of gray.
Then compile again.