Activating a defined macro in a class from main.cpp
You cannot not, but also you should not try to define a macro in a cpp file and use it in another cpp file.

Instead, you have to define it in a h (header) file, which is included in both cpp files.

Why would you define it in main.cpp or main.h anyway if you don't use it in those files?

You have mainly three options:


Define it in gyro.h so you include it in gyro.cpp where you use it. You can later use it in other files as well.
Define it in gyro.cpp so you can use it only in that file. This prevents the macro being used in other files (which can be safer).
Define it in a separate file, e.g. euler.h and include this header file everywhere you need it.


See also Juraj's comments below.