MyFPGA Forum

标题: 求助:编译NIOS II的程序时,总出现如下报错,是什么问题? [打印本页]

作者: yjxiao    时间: 2011-3-31 15:31
标题: 求助:编译NIOS II的程序时,总出现如下报错,是什么问题?
** Build of configuration Debug for project led ****

make -s all includes  
Compiling main.c...
../main/main.c:5: warning: return type of 'main' is not `int'
../main/main.c:10:2: warning: no newline at end of file
Linking led.elf...
obj/main/main.o(.text+0x0): In function `main':
../main/main.c:5: multiple definition of `main'
obj/hello_world.o(.text+0x0):../hello_world.c:20: first defined here
/cygdrive/c/altera/72/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: Warning: size of symbol `main' changed from 48 in obj/hello_world.o to 28 in obj/main/main.o
collect2: ld returned 1 exit status
make: *** [led.elf] Error 1
Build completed in 2.031 seconds
出错信息如上,请高手指点!谢谢!!!
作者: yqzhang    时间: 2011-3-31 15:46
遇到这种问题,一般需要点击一下 Clean 菜单, Clean 一下整个project就好了
作者: yjxiao    时间: 2011-3-31 16:21
我试试,多谢指教
作者: qsj8362234    时间: 2011-4-13 10:16
是不是有2个main函数了
作者: WADERZ    时间: 2011-5-17 14:05
看一下c语言的书,应该可以解决




欢迎光临 MyFPGA Forum (http://www.myfpga.org/discuz/) Powered by Discuz! X3