Receiving multiple definition build error when using SSD1306 driver
I'm new to STM32 and my C skills are very rusty
I'm trying to create a simple program to demo the usage of an Adafruit SSD1306 SPI OLED board
In my main.c I need to #include "ssd1306.h" from this driver because I need some of the definitions.
The problem is that I'm receiving a bunch of multiple definition errors. For example:
multiple definition of `HAL_EXTI_ClearConfigLine'; ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_exti 3.o:/Users/chrisk/Documents/STM32CubeIDE/workspace_1.11.0/STM32_AdafruitSSD1306_128x32_Example/Debug/../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_exti 3.c:318: first defined here stm32f0xx_hal_exti.c /STM32_AdafruitSSD1306_128x32_Example/Drivers/STM32F0xx_HAL_Driver/Src line 318 C/C++ Problem
multiple definition of `HAL_EXTI_ClearPending'; ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_exti 3.o:/Users/chrisk/Documents/STM32CubeIDE/workspace_1.11.0/STM32_AdafruitSSD1306_128x32_Example/Debug/../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_exti 3.c:497: first defined here stm32f0xx_hal_exti.c /STM32_AdafruitSSD1306_128x32_Example/Drivers/STM32F0xx_HAL_Driver/Src line 497 C/C++ Problem
multiple definition of `HAL_EXTI_GenerateSWI'; ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_exti 3.o:/Users/chrisk/Documents/STM32CubeIDE/workspace_1.11.0/STM32_AdafruitSSD1306_128x32_Example/Debug/../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_exti 3.c:518: first defined here stm32f0xx_hal_exti.c /STM32_AdafruitSSD1306_128x32_Example/Drivers/STM32F0xx_HAL_Driver/Src line 518 C/C++ ProblemIf I remove the #include "ssd1306.h" line that problem goes away, but I need the definitions so this isn't a viable solution.
My best guess is that ssd1306.h is including a resource around line 18 that is included someplace else and therefore causes the multiple definition error. More likely I'm totally missing something important.
Any ideas or suggestions?
Thanks!
Chris
