Undefined referenece to error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-28 2:29 PM
Hi,
from Properties -> Paths and Symbols i added file path to 'Include Directories'. Then, i added my source file and my header file to 'my_libs' which i created under project_name -> Drivers.
When i call a function from library i see 'undefined reference to (function_name)' error.
How can i fix this?
Best regads.
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
-
STM32F0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-29 2:01 AM
In this tree diagram the HAL_Driver node at the bottom?​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-28 3:17 PM
Include files describe the interfaces for the code, not the library code itself.
Add the library source files to your project so they get built, and are linkable.
For definitions, make sure stm32xyz_hal_conf.h in the project calls out the modules you want to use.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-29 1:19 AM
Thanks for answer.
I added this snippet to stm32f0xx_hal_conf.h
#ifdef DS18B20
#include "DS18B20.h"
#endif /* DS18B20 DRIVER ENABLED*/
But i couldn't understand where should i add the library source files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-29 2:01 AM
In this tree diagram the HAL_Driver node at the bottom?​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-29 6:05 AM
Thanks, now it works
