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
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
.