How do I execute a file in Cygwin?

后端 未结 9 1193
爱一瞬间的悲伤
爱一瞬间的悲伤 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:19

    ./a.exe at the prompt

    0 讨论(0)
  • 2021-02-03 18:21

    When you start in Cygwin you are in the "/home/Administrator" zone, so put your a.exe file there.

    Then at the prompt run:

    cd a.exe

    It will be read in by Cygwin and you will be asked to install it.

    0 讨论(0)
  • 2021-02-03 18:29

    Thomas wrote:

    Apparently, gcc doesn't behave like the one described in The C Programming language

    It does in general. For your program to run on Windows it needs to end in .exe, "the C Programming language" was not written with Windows programmers in mind. As you've seen, cygwin emulates many, but not all, features of a POSIX environment.

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