Search notes:

gcc -D

With -D, the value of a macro can be defined.

prog.c

#include <stdio.h>

#define symbol2quotedText(t) #t
#define macroValue2quotedText(t) symbol2quotedText(t)

int main() {
    printf("NUMBER = %d\n", NUMBER);
    printf("TEXT   = %s\n", macroValue2quotedText(TEXT));
    printf("QUOTED = %s\n", QUOTED);
}
Github repository about-gcc, path: /options/D_/prog.c

compile.bat

gcc -DNUMBER=42 -DTEXT="Unquoted text" -DQUOTED="\"Quoted text\"" prog.c -o prog.exe
Github repository about-gcc, path: /options/D_/compile.bat

See also

GCC options
The C# compiler option -define

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759414331, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/C-C-plus-plus/GCC/options/D_/index(62): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78