原文:/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' collect2: ld returne

用linux编程,当编译时出现这样的错误 usr lib gcc i linux gnu . http: www.cnblogs.com .. i linux gnu crt .o: In function start : .text x : undefined reference to main collect : ld returned exit status 最可能的原因是main拼写错误 ...

2012-11-12 19:31 0 3360 推荐指数:

查看详情

(.text+0x18): undefined reference to `main'

在将VS中的程序移植到ubuntu中出现的一个问题,主要原因是在vs中默认的主函数写成int _tmain(), 而在gcc编译时要找的是int main().改过来就可以了。 ...

Fri Aug 25 18:19:00 CST 2017 0 1477
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM