I have recently gotten into programming this is a small C code I started on.
I am using Ubuntu 13.10.
int main(int argc, char *argv[])
{
puts("Hello world.");
return 0;
}
Whenever I try to compile it using
gcc exl.c -o exl1
cc exl.c -o exl1
or anything like that i just keep getting
gcc: error: exl.c: No such file or directory
gcc: fatal error: No input files
compilation terminated.
I have no Idea what to do any help would be greatly appreciated.
P.S. I have already done
sudo apt-get install build-essential
sudo apt-get update build-essential
sudo apt-get upgrade build-essential
exl.c
file. Are you sure you saved the code to the contents of a file with that exact name in the current working directory or changing to the full path? This is really a 'simple' file location issue, rather than a compilation error.