Programming/C Win32 MFC2015. 5. 19. 14:35

배치빌드 하거나 할 경우 유용하게 쓰이는 옵션


-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.

If you are invoking the preprocessor from a shell or shell-like program you may need to use the shell's quoting syntax to protect characters such as spaces that have a meaning in the shell syntax.


If you wish to define a function-like macro on the command line, write its argument list with surrounding parentheses before the equals sign (if any). Parentheses are meaningful to most shells, so you will need to quote the option. With sh and csh, -D'name(args...)=definition' works.


-D and -U options are processed in the order they are given on the command line. All -imacros file and -include file options are processed after all -D and -U options. 


-U name

Cancel any previous definition of name, either built in or provided with a -D option. 


-undef

Do not predefine any system-specific or GCC-specific macros. The standard predefined macros remain defined. 


[링크 : https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html] 


+

Visual studio에서는 /D로 적용된다.

[링크 : https://msdn.microsoft.com/ko-kr/library/teas0593.aspx]

'Programming > C Win32 MFC' 카테고리의 다른 글

가변인자를 다시 넘겨주기  (2) 2015.07.07
printf 가변인자의 비밀?  (0) 2015.06.18
setjmp, longjmp  (0) 2015.05.19
inline 함수..  (0) 2015.05.12
혼돈의 카오스 - 교차참조 헤더  (0) 2015.05.11
Posted by 구차니