Alexander Yin
Junior Member level 2
I have installed a complete version of Cygwin. When I tried to run the Hello World program which is provided in An Introduction to GCC. The code which is called hello.c looks like:
#include <stdio.h>
int
main (void)
{
printf ("Hello, world!\n");
return 0;
}
I used the following command:
$ gcc -Wall hello.c -o hello
But after this command is run, nothing happens and there is no hello.out either. When I tried to run the program by:
$ ./hello
An error comes:
bash: ./hello: No such file or directory
How can I solve this problem?
Thank you.
Added after 18 minutes:
I tried to move the hello.c to other directory, but still it does not work. It seems that executable file cannot be created. But I don't know how to solve it.
Added after 35 minutes:
I have reinstalled the Devel package in Cygwin, but of no use.
#include <stdio.h>
int
main (void)
{
printf ("Hello, world!\n");
return 0;
}
I used the following command:
$ gcc -Wall hello.c -o hello
But after this command is run, nothing happens and there is no hello.out either. When I tried to run the program by:
$ ./hello
An error comes:
bash: ./hello: No such file or directory
How can I solve this problem?
Thank you.
Added after 18 minutes:
I tried to move the hello.c to other directory, but still it does not work. It seems that executable file cannot be created. But I don't know how to solve it.
Added after 35 minutes:
I have reinstalled the Devel package in Cygwin, but of no use.