keil compilation error - undefined symbol
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-06-07 8:31 PM
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
Labels:
- Labels:
-
Keil
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-06-07 10:00 PM
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.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-06-07 10:33 PM
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.