找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 7343|回复: 3
收起左侧

ccs编译错误msp4305529 error #10056: symbol "main" redefined: first def

[复制链接]
ID:931208 发表于 2021-7-30 16:48 | 显示全部楼层 |阅读模式
下面是复制的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

图3

图2

图2

图1

图1
回复

使用道具 举报

ID:130230 发表于 2021-8-2 14:08 | 显示全部楼层
第一句不是已经说了有2个main.c了么。。
回复

使用道具 举报

ID:585147 发表于 2021-8-2 13:54 | 显示全部楼层
error #10056: symbol "main" redefined: first defined in "./main.obj"; redefined in "./oled project/oled.obj"

这2个文件重复定义了main,提示很明确了
回复

使用道具 举报

ID:883242 发表于 2021-7-30 18:02 | 显示全部楼层
main.c和oled.c里面都有main()
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表