Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
925 views
in Technique[技术] by (71.8m points)

c - gcc compiler in Cygwin output .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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...