This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Linker unable to find function definition despite .c file being in the project and .h file included

Hi,

I encountered an issue when moving my project directory within my computer.
In fact, the linker seems to be unable to find some functions definitions :

Error[Li005]: no definition for "app_uart_init" [referenced from .....\main.o]
Error[Li005]: no definition for "app_uart_put" [referenced from .....\main.o]

These functions are defined in app_uart_fifo.c and the source file is included in my project workspace.


My investigations have shown that the first if condition of the source file is not working as expected:


#if NRF_MODULE_ENABLED(APP_UART)
...
app_uart_init definition
app_uart_put definition

...

#endif

Thus I checked if APP_UART_ENABLED was defined, and its defintion can be found in sdk_config.h which also is included within my project workspace.
Bypassing this if condition only creates more errors as some identifiers are undefined.

I don't know anymore what to try in order to fix my issue, any idea ?
(FYI I am working on IAR 8.50.6.28951)

Thanks in advance for your help !

Related