确定 C 可执行文件名称 [英] Determining C executable name
本文介绍了确定 C 可执行文件名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我们编译 C 程序时,输出存储在 a.out 中.我们如何将编译后的输出重定向到另一个文件?
When we are compiling a C program the output is stored in a.out. How can we redirect the compiled output to another file?
推荐答案
大多数 C 编译器为此提供了 -o
选项,例如:
Most C compilers provide the -o
option for this, such as:
gcc -o gentext gentext.c
cc -o mainprog -Llib -lmymath firstbit.c secondbit.o
xlc -o coredump coredump.c
这篇关于确定 C 可执行文件名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文