duplicate symbol _main in: / linker command failed with exit code 1

时间:2021-12-16 10:21:17

duplicate symbol _main in:

/Users/mb467/Library/Developer/Xcode/DerivedData/barChartDemo-gevlnavnpanltbgqdweijouguhcx/Build/Intermediates/barChartDemo.build/Debug-iphoneos/barChartDemo.build/Objects-normal/armv7/main-CCADE8545E02147B.o

/Users/mb467/Library/Developer/Xcode/DerivedData/barChartDemo-gevlnavnpanltbgqdweijouguhcx/Build/Intermediates/barChartDemo.build/Debug-iphoneos/barChartDemo.build/Objects-normal/armv7/main-3D90E6383DC1F398.o

ld: 1 duplicate symbol for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)

问题:main.m 文件重复了,删除其中一个即可