如何使用 gcc 在包含(例如)python/php/perl 代码的文件中扩展宏?
有一个文件包含:
#define foo very important stuff
#define feast Christmas
I should take care of some foo for feast.
我曾尝试使用:
$ gcc -x c++ -E - < text.txt > output.txt
但它显示了这个:
$ cat output.txt
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
I should take care of some very important stuff for Christmas.
如何避免 gcc 添加这些注释和(如果可能)额外的换行符?