原文:/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