Created
September 9, 2025 19:48
-
-
Save denwarenjii/67d618485a220499ed087e07938f8ed6 to your computer and use it in GitHub Desktop.
Print `#define` at compile time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* From https://stackoverflow.com/questions/1562074/how-do-i-show-the-value-of-a-define-at-compile-time */ | |
| #define ABC 1234 | |
| #define XSTR(x) STR(x) | |
| #define STR(x) #x | |
| #pragma message "The value of ABC: " XSTR(ABC) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment