2022-03-10 06:57 AM
I chaecked the following:
There are no variable definitions in my headers. I use #ifndef/#define/#endif in all headers.
After 2 days of trying I don't know what to do anymore. What might have changed in V1.9.0?
Solved! Go to Solution.
2022-03-10 07:58 AM
This is because you have variables definitions in .h files without extern.
GCC 10 changed this behavior.
You can add -fcommon to revert to the old behavior.
I didn't read carefully your question...
2022-03-10 07:07 AM
Look at the error messages. It should tell you where something was first defined along with the definition it just came to. See why there are multiple definitions. Perhaps you have duplicate files in the directory.
2022-03-10 07:51 AM
Thank you for your support.
The error messages are shown for all my variables like this:
main.h:85: multiple definition of `hadc1'; Src\GUIConf.o:C:\Users\JB\STM32CubeIDE\workspace_1.3.0\VM100\Inc/main.h:85: first defined here
In all of them the part "Src\GUIConf.o" is the same.
I checked the file GUIConf.c. It doesn't seem to have any issues.
2022-03-10 07:58 AM
This is because you have variables definitions in .h files without extern.
GCC 10 changed this behavior.
You can add -fcommon to revert to the old behavior.
I didn't read carefully your question...
2022-03-10 08:17 AM
No, you were right! With -fcommon I can work again.
Thanks a lot!
2022-03-10 09:27 AM
So have a look at the last answer of this post:
2022-03-22 09:08 AM
same problem here, i spent a whole working day chasing ghosts.
Thanks @Nikita91