gg编译器在Cygwin输出.exe中 [英] gcc compiler in Cygwin output .exe

查看:189
本文介绍了gg编译器在Cygwin输出.exe中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从C开始,学习基础知识。
我已经创建了一个简单的程序,在编译时,预计会编译为a.out,但是gcc正在编译为a.exe。

解决方案

Windows上的GCC默认在Windows上创建名为 a.exe 的文件,因为 .exe 扩展很重要 - 文件名 a.out 在Windows上不会被识别为可执行程序。默认的输出可以被命名为 a.out.exe ,但它不同于 a.out ,所以它同样可以生成名为 a.exe 的文件。



a。 exe 也少了按键。


Just starting in C, and learning the basics. I have created a simple program that when compiled, would expected to compile as a.out however gcc is compiling as a.exe.

解决方案

GCC on Windows defaults to creating an file named a.exe on Windows, because the .exe extension is important - a file name a.out would not recognized as an executable program on Windows. The default output could be named a.out.exe but it would be different from a.out anyway, so it is just as sensible to produce a file named a.exe instead.

a.exe is less keypresses, too.

这篇关于gg编译器在Cygwin输出.exe中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆