c语言编译提示:undefined reference to `main
今天看别人代码发现有身边有人出现了这个错,其实错误提示的意思是没有定义main函数,因为c语言中main函数是一个程序的入口;这种错误一般是main函数拼写错误所导致的/usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/x86_64-linux-gnu/Scrt1.o: In function _start': (.text+0x20): undefined reference tomain’collect2: error: ld returned 1 exit status
复制链接