makefile - `Is defining a macro via -D option ALWAYS equivalent to #define MACRO (except precedence) -
i have third party piece of code works differently when add macro via makefile e.g. -dmacro instead of doing #define macro in top level header file (which documentation implies included in files).
i googled if there differences in defining in different ways not come except precedence of -d macro , #define macro.
i wondering if missing make documentation / c standards before start debugging , determining issue.
thanks answers.
usually, it's same neither make nor iso standard have it. it's compiler itself, may not have -d option.
to make, it's running command (such gcc) whatever options takes. iso doesn't specify anything how run compiler, how compiler (and things creates) behaves.
for gcc, preprocessor options can found here looks is identical #define.
Comments
Post a Comment