使用gcc test.c -o app指令报错

孜孜不倦fly / 2023-08-30 / 原文

报错信息:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function _start': (.text+0x24): undefined reference to main'
collect2: error: ld returned 1 exit status
报错原因:.c文件没有保存