카테고리 없음

compile에 string define 보내기

두유라이크락 2013. 4. 12. 10:21


http://stackoverflow.com/questions/2410976/how-to-define-a-string-in-gcc-command-line




5down vote

to avoid the shell "eating" the quotes and other characters, you might try single quotes, like this:

gcc -o test test.cpp -DNAME='"Mary"'

This way you have full control what is defined (quotes, spaces, special characters, and all).

share|improve this answer

저작자표시 (새창열림)