2022-06-15 10:35 PM
1.sturcture declaration we have facing some errors in the GCC 10
in terms of the variables and function we use "extern: solve the error
2.But in terms of structure how we resolve the errors
please look the issue and give me some solutions .
2022-06-15 10:49 PM
> please look the issue
Where?
2022-06-15 11:11 PM
How to use structure in gcc 10 ?
1. structure use in all over in program but we can't use extern if we use extern then give multiple definition errors
and we can't use extern the then give first define structure error
i can define structure in multiple files how we can use structure in the gcc10.
2022-06-16 01:39 AM
You already have two threads on this:
Why are you starting yet another??
BTW: Please don't put the entire question in the title.
@SKapa.1 "1.sturcture declaration we have facing some errors in the GCC 10
in terms of the variables and function we use "extern: solve the error"
If adding 'extern' fixed the error then, as noted in your other threads, that means that your original code was wrong.
"we can't use extern if we use extern then give multiple definition errors"
Eh?? You just said extern fixed the errors?!
This makes no sense: you use extern to fix "multiple definition" errors - it won't cause them!
It sounds like you need to go back and review the basics of sharing things between C source files:
http://c-faq.com/decl/decldef.html
In particular, understand the difference between definitions and declarations.
Note that this is standard C stuff - nothing specific to GCC or STM32.
"i can define structure in multiple files"
Then you will certainly get "multiple definition" errors - that's literally what the words mean!
"please look the issue and give me some solutions"
Look where, exactly?