- 论坛徽章:
- 0
|
use gcc in shell script
Hi, Red Sleeve or other high hands;
I still have the problem of changing the value of the variable in the c file. Say, the file is soso.c, the variable is cHANGEABLE, I want the value of cHANGEABE to be xingle (its default value is "quesheng", then I created a script called changeit, in changeit:
gcc -D cHANGEABLE=$1 -o $1 soso.c
then I run the script:
changeit xingle
but the executable xingle still not OK.
PS: I also added the following lines in soso.c:
#ifndef cHANGEABLE
define cHANGEABLE quesheng
#endif
Any problem you figure out?
Thanks! |
|