红联Linux门户
Linux帮助

ecplise 编译c 出错

发布时间:2009-05-17 11:26:38来源:红联作者:ld10552
在ecplise 下编译 helloworld
console下 提示
make all
Building file: ../main.c
Invoking: GCC C Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.c"
Finished building: ../main.c

Building target: helloword
Invoking: GCC C Linker
gcc -o"helloword" ./main.o
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld 返回 1
make: *** [helloword] 错误 1

希望高手解决 ,谢谢
文章评论

共有 2 条评论

  1. 蔡万钊 于 2009-05-17 19:02:31发表:

    没有 main()

  2. Cimsbbl 于 2009-05-17 11:33:47发表:

    偶不懂哦