I would like to override a macro from the command line. Somewhere in my source, there is a definition like this:
#define MY_FOO 1
What I wo
You can't.
The command line is handled before any source and header files.
If a source file defines a macro, then it must not be defined before, and will get the new value from now on.
The only way to change it, is to #undef
and #define
it again, at a later point. If you have access to a header that is included after the definition, then you have a chance.