That's a linker error, the code compiled cleanly, so the syntax and the declaration were fine, but the linker couldn't find a definition for uart_init to resolve the call against. Likely causes: you declared it in a header and called it but never wrote the function body; you wrote the body in uart.c but forgot to add uart.o to the link command; or it lives in a library you didn't pass with -l. The fix is on the link line or the missing definition, never in the calling code's syntax. Contrast this with "implicit declaration of uart_init," which is a compiler warning meaning you never even declared it, different stage, different fix.
C Programming · Interview question
You get "undefined reference to uart_init". What stage failed and what are the likely causes?
A strong answer
What a weak answer sounds like
You know the answer. Do you know what gets you dinged?
Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.
From the lesson
The C Compilation Pipeline
What gcc actually does between your .c file and a flashable binary, and why 'undefined reference' and 'implicit declaration' are different bugs at different stages.