是否可以从源代码向 GNU 构建窗口传递消息? 像这样的东西:
foo.c(不是 makefile)
#ifdef DEBUG
Echo "The Debug flag is set"
// more code here
最佳答案
查看 gcc 中的诊断编译指示:
http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
例如
GCC also offers a simple mechanism for printing messages during compilation. `#pragma message string` Prints string as a compiler message on compilation. The message is informational only, and is neither a compilation warning nor an error.
#pragma message "Compiling " __FILE__ "..."
关于c - 从源代码(GNU 编译器)与构建窗口对话,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12902272/