标题: ccs编译错误msp4305529 error #10056: symbol "main" redefined: first def [打印本页]

作者: 1686216939    时间: 2021-7-30 16:48
标题: ccs编译错误msp4305529 error #10056: symbol "main" redefined: first def
下面是复制的console内容

<Linking>
error #10056: symbol "main" redefined: first defined in "./main.obj"; redefined in "./oled project/oled.obj"
remark #10372-D: (ULP 4.1) Detected uninitialized Port A in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
error #10010: errors encountered during linking; "oled.out" not built
remark #10372-D: (ULP 4.1) Detected uninitialized Port B in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
remark #10372-D: (ULP 4.1) Detected uninitialized Port C in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
remark #10372-D: (ULP 4.1) Detected uninitialized Port D in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.

>> Compilation failure
makefile:188: recipe for target 'oled.out' failed
gmake[1]: *** [oled.out] Error 1
makefile:184: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****



图片2,3是路径,我都包含进去了的,然后工程里也没有标红,但是就是有错误
网上也搜过了,试了很多办法就是不行,官网有类似的,但是也没看出来是咋解决的。

3.png (48.56 KB, 下载次数: 94)

图3

图3

2.png (41.94 KB, 下载次数: 70)

图2

图2

1.png (28.99 KB, 下载次数: 75)

图1

图1

作者: Hephaestus    时间: 2021-7-30 18:02
main.c和oled.c里面都有main()
作者: jordonwu    时间: 2021-8-2 13:54
error #10056: symbol "main" redefined: first defined in "./main.obj"; redefined in "./oled project/oled.obj"

这2个文件重复定义了main,提示很明确了
作者: jizhongbiao    时间: 2021-8-2 14:08
第一句不是已经说了有2个main.c了么。。




欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1