2024-08-07 09:56 PM - last edited on 2024-08-08 02:25 AM by Andrew Neil
Hi,
I'm getting this below compile time errors...
undefined reference to `MX_RTC_Init'
However, I have included the rtc.h header file, which contains the declaration of the MX_RTC_Init(void) function.
#include "main.h"
#include "cmsis_os.h"
#include "fdcan.h"
#include "i2c.h"
#include "lwip.h"
#include "rtc.h"
#include "spi.h"
#include "usart.h"
#include "usb_device.h"
#include "app_touchgfx.h"
Why does CubeIDE still giving me this error?
Thanks
2024-08-09 08:29 AM
2024-08-09 08:43 AM - edited 2024-08-09 08:46 AM
@iDeew wrote:the header file is not appearing in the Project Explorer of CubeIDE.
Header files don't need to be listed in the Project - they are found via the #include directives in the code.
More importantly, the rtc.c file is not appearing in your Project - it should be in that list you've marked with the question mark:
That'll be why it's not being built and, thus, why there's no definition for MX_RTC_Init