Undefined reference error.
Hi, I have converted an CubeIDE project to CPP so I can get a GLCD library working, the Adafruit GFX library, for my STM32F407-Discovery board. This required I rename some files from .C to .CPP. It all worked fine. Now I want to get the CAN interface working and when I call "MX_CAN1_Init()", I get the following error.
"main.cpp:672: undefined reference to `HAL_CAN_Init"
I admit I'm a complete novice to this type of C and CPP hybrid, and I hope someone has a solution that will fix this.
I think an "extern "C"" statement would fix it, but no luck, and I'm not even sure I'm using this statement in the source correctly. Can someone help out here?
Thanks.
kvresto.
BTW: I had the same type of error within the "stm32f4xx_it.c" file, It complained about no reference to "HAL_CAN_IRQHandler(&hcan1)" this was for the CAN interrupt, but when I renamed it with the .CPP extension that went away.
