免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1863 | 回复: 6
打印 上一主题 下一主题

如何编译完成直接执行 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-04-12 16:03 |只看该作者 |倒序浏览
不想使用  gcc a.c  && ./a.out
能不能不出现 ./a.out

论坛徽章:
0
2 [报告]
发表于 2011-04-12 16:08 |只看该作者
-o file
           Place output in file file.  This applies regard-
           less to whatever sort of output is being pro-
           duced, whether it be an executable file, an
           object file, an assembler file or preprocessed C
           code.

           If -o is not specified, the default is to put an
           executable file in a.out, the object file for
           source.suffix in source.o, its assembler file in
           source.s, a precompiled header file in
           source.suffix.gch, and all preprocessed C source
           on standard output.

论坛徽章:
0
3 [报告]
发表于 2011-04-12 16:26 |只看该作者
我的意思是不希望出现 ./*.out
即编译完就执行, 二进制文件最好不出现

论坛徽章:
0
4 [报告]
发表于 2011-04-12 16:31 |只看该作者
我的意思是不希望出现 ./*.out
即编译完就执行, 二进制文件最好不出现

论坛徽章:
0
5 [报告]
发表于 2011-04-12 16:53 |只看该作者
你以为是脚本啊
可以直接执行

论坛徽章:
0
6 [报告]
发表于 2011-04-12 16:56 |只看该作者
写个makefile

论坛徽章:
0
7 [报告]
发表于 2011-04-12 17:23 |只看该作者
类是于这样的
gcc a.c -o - | eval -
但这个执行不了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP