Skip to main content
SS.Sagar
Associate III
June 8, 2016
Question

keil compilation error - undefined symbol

  • June 8, 2016
  • 2 replies
  • 1356 views
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
This topic has been closed for replies.

2 replies

matic
Associate III
June 8, 2016
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
Senior III
June 8, 2016
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.