How do I execute a file in Cygwin?

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

    To execute a file in the current directory, the syntax to use is: ./foo

    As mentioned by allain, ./a.exe is the correct way to execute a.exe in the working directory using Cygwin.

    Note: You may wish to use the -o parameter to cc to specify your own output filename. An example of this would be: cc helloworld.c -o helloworld.exe.

提交回复
热议问题