|
发表于 2004-3-16 20:46:18
|
显示全部楼层
有一个编译perl脚本的命令:
perlcc
具体可以看:
man perlcc
PS:本人英语比较莱,但有什么问题可以来问哦
和GCC的用法相似:
- $ perlcc hello # Compiles into executable 'a.out'
- $ perlcc -o hello hello.pl # Compiles into executable 'hello'
-
- $ perlcc -O file # Compiles using the optimised C backend
- $ perlcc -B file # Compiles using the bytecode backend
-
- $ perlcc -c file # Creates a C file, 'file.c'
- $ perlcc -S -o hello file # Creates a C file, 'file.c',
- # then compiles it to executable 'hello'
- $ perlcc -c out.c file # Creates a C file, 'out.c' from 'file'
-
- $ perlcc -e 'print q//' # Compiles a one-liner into 'a.out'
- $ perlcc -c -e 'print q//' # Creates a C file 'a.out.c'
-
- $ perlcc -I /foo hello # extra headers (notice the space after -I)
- $ perlcc -L /foo hello # extra libraries (notice the space after -L)
-
- $ perlcc -r hello # compiles 'hello' into 'a.out', runs 'a.out'.
- $ perlcc -r hello a b c # compiles 'hello' into 'a.out', runs 'a.out'.
- # with arguments 'a b c'
-
- $ perlcc hello -log c # compiles 'hello' into 'a.out' logs compile
- # log into 'c'.
复制代码 |
|