1
I’m trying to compile a file. c but I’m not getting it.
I type the following command:
gcc main.c -o HELLO
and the following error appears:
gcc: error: main.c: No such file or directory
gcc:fatal error: no input files
compilation terminated.
I did the following in the notebook itself:
include <stdio.h>
int main()
{
printf("Hello World\n");
return(0);
}
What to do??
You are in the folder that contains the file
main.c
?– Jéf Bueno
The ta file on the Desktop, has difference?
– Henrique Rezende
Of course there is! Look at my answer
– Jéf Bueno
You use Linux or Windows, in Linux I usually give the commands
cd
to reach the file location and execute the command.– Giancarlo Abel Giulian
In the
Windows
is alsocd
– Jéf Bueno