How do I execute a file in Cygwin?
Solution 1:
./a.exe at the prompt
Solution 2:
you should just be able to call it by typing in the file name. You may have to call ./a.exe as the current directory is usually not on the path for security reasons.
Solution 3:
just type ./a in the shell
Solution 4:
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
.