The Error clearly says that undefined reference to \`main' collect2: error: ld returned 1 exit status collect2: error: ld returned 1 exit status which means main was not defined in your hello.c and retuned 1 to the operating system
undefined reference to \`main' collect2: error: ld returned 1 exit status collect2: error: ld returned 1 exit status