프로그램 사용/gcc2016. 11. 17. 17:43

-D 는 아는데..

-DFLAG=1 이런식으로 쓰는걸 몰라서 검색 ㅠㅠ


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

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

[링크 : https://wiki.openssl.org/index.php/Manual:OPENSSL_VERSION_NUMBER(3)]

'프로그램 사용 > gcc' 카테고리의 다른 글

gcc cpp type (유니코드 문자열)  (0) 2017.04.04
gcc 매크로 확장 define stringfication  (0) 2017.01.02
gcc -fPIC  (0) 2016.06.22
gcc dependency .d 파일?  (0) 2016.03.28
gcc -M -MM  (0) 2015.12.17
Posted by 구차니