printf("Hello world!\r\n"); #ifdef TEST_MACRO printf("TEST_MACRO\r\n"); #endif return 0; } 1. 2. 3. 4. 5. 6. 7. 8. 9. gcc编译:gcc -Wall test.c -o test 这样运行的结果:Hello world! gcc编译:gcc -Wall -DTEST_MACRO test.c -o
-D name Predefine name as a macro, with definition 1. -D name=definition The contents of definition are tokenized and processed as if they appeared during translation phase three in a #define directive. In particular, the definition will be truncated by embedded newline characters. -I(包含头...
而c++由于允许重载,就出现同一个函数名可能对应多个实际的函数问题,于是就会有name mangling ,而且这个m...
-FR[file] 命名扩展 .SBR 文件 name extended .SBR file -Fm[file] 命名映射文件 name map file 预处理器 -FI 命名强制包含文件 name forced include file -C 不吸取注释 don't strip comments -U 移除预定义宏 remove predefined macro -D{=|#} 定义宏 define macro -u 移除所有预定义宏 remove all ...
-rm *~在上述的Makefile中,要使用某个macro可用$(macro_name)如此的形式.make会自动的加以展开. $@为该rule的Target,而$?则为该rule的depend. 若在command的前面加一个"-",表示若此command发生错误则不予理会,继续执行下去. 上述的Makefile的关系可以表示如下: ...
-DMACRO 以字符串"1"定义 MACRO 宏。 -DMACRO=DEFN 以字符串"DEFN"定义 MACRO 宏。 -g 生成调试信息。GNU 调试器可利用该信息。 -ggdb 此选项将尽可能的生成 gdb 的可以使用的调试信息。 -gstabs 此选项以stabs格式声称调试信息,但是不包括gdb调试信息。 -gstabs+ 此选项以stabs格式声称调试信息,并且包含仅...
gcc -D选项在man中的说明如下: -D name Predefine name as a macro, with definition 1. -D name=definition The contents of definition are tokenized and processed as if they appeared during translation …
macro \”%s\” passed %u arguments, but takes just %u” 宏“%s”传递了 %u 个参数,但只需要 %u 个” unterminated argument list invoking macro \”%s\”" 调用宏“%s”时参数列表未终止” function-like macro \”%s\” must be used with arguments in traditional C” ...
-UMACRO 取消对 MACRO 宏的定义。 -w 不生成任何警告信息。 -Wall 生成所有警告信息。 参数详解 -x language filename设定文件所使用的语言,使后缀名无效,对以后的多个有效.也就是根据约定C语言的后缀名称是.c的,而C++的后缀名是.C或者.cpp,如果你很个性,决定你的C代码文件的后缀名是.pig 哈哈,那你就要用...
8、字 defined cannot be used as a macro name “defined不能被用作宏名 _COUNTER_ expanded inside directive with -fdirectives-only 带 -fdirectives-only 时 _COUNTER_ 在指示中扩展 _VA_ARGS_ can only appear in the expansion of a C99 variadic macro _VA_ARGS_ 只能出现在 C99 可变参数宏的展开...