Using the same variable name in two completely different modules throws a double definition error

I have developed two different modules for an experimental drone and some of the variables have the same name.

Every time I tried to compile them, though, even though all of the definition are on different files, on different folder, on different modules, I get a “already defined here” error and have to change one the name of them.

I would like to know if this is normal behavior for the px4 firmware or if this is some weird bug happening in my system.

Thanks in advance.

If you mean to have it shared, then declare it in one file and mark it extern in the other files.
If you mean to have it private to each file declare it static in each file.
You should study the meaning and use of these keywords as it seems you missed this somewhere.

I see, I was under the impression it only made a difference for files in the same module.
Thanks a lot!