cancel
Showing results for 
Search instead for 
Did you mean: 

as we discussion we move stmcubeide32 1.7.0 version to stmcubeide32 1.7.0 we are solve the multiple error resolve with the help of "extern" but some error reaming regarding structure declaration give some error in gcc 10 not resolve

SKapa.1
Associate II

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 .

3 REPLIES 3
KnarfB
Principal III

> please look the issue

Where?

SKapa.1
Associate II

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.

Andrew Neil
Evangelist III

You already have two threads on this:

https://community.st.com/s/question/0D53W00001boEqfSAE/i-am-working-with-cubeide-170-i-was-to-move-my-project-on-latest-190-version-but-this-version-of-cubeide-is-give-me-500-errors-do-you-know-where-i-can-download-cubeide-131-again-

https://community.st.com/s/question/0D53W00001boGjuSAE/how-to-resolve-problem-of-stm32-cube-ide-170-project-move-to-190-lots-of-error-is-in-it-because-of-gcc-10

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?