cancel
Showing results for 
Search instead for 
Did you mean: 

keil compilation error - undefined symbol

SS.Sagar
Associate III
Posted on June 08, 2016 at 05:31

Hi,

i m using keil compiler ver-5. i m using one function from other file and using it in main file. following is the error i got.

lcd Configuration\lcd Configuration.axf: Error: L6218E: Undefined symbol init_lcd (referred from main.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 1 error messages.
''lcd Configuration\lcd Configuration.axf'' - 1 Error(s), 0 Warning(s).
Target not created.

#c #nucleo #keil
2 REPLIES 2
matic
Associate III
Posted on June 08, 2016 at 07:00

If you have a definition of that function in a something.c file, then you should put its declaration (function prototype) in a header file something.h and then include that header in a main.c file as #include ''something.h''.

If function is defined as:

void Function(void)

{

  ....

}

its declaration, which should be in a header file looks like:

void Function(void);

This is just an example of a common practice.

AvaTar
Lead
Posted on June 08, 2016 at 07:33

Methinks this is a linker error, because a function named ''

init_lcd()

'' is called in main, but nowhere implemented.

Implement it, or add the library where the implementation is located.