gcc compiler in Cygwin output .exe

后端 未结 1 1630
余生分开走
余生分开走 2020-12-19 21:02

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.

1条回答
  •  有刺的猬
    2020-12-19 21:47

    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.

    0 讨论(0)
提交回复
热议问题