How do I execute a file in Cygwin?

后端 未结 9 1198
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-03 17:26

How can I execute a.exe using the Cygwin shell?

I created a C file in Eclipse on Windows and then used Cygwin to navigate to the directory. I called gcc on

9条回答
  •  被撕碎了的回忆
    2021-02-03 18:08

    Apparently, gcc doesn't behave like the one described in The C Programming language, where it says that the command cc helloworld.c produces a file called a.out which can be run by typing a.out on the prompt.

    A Unix hasn't behaved in that way by default (so you can just write the executable name without ./ at the front) in a long time. It's called a.exe, because else Windows won't execute it, as it gets file types from the extension.

提交回复
热议问题