今天看别人代码发现有身边有人出现了这个错,其实错误提示的意思是没有定义main函数,因为c语言中main函数是一个程序的入口;这种错误一般是缺少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

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐