clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
它说我有:
ld:/ Users / timpark / Library / Developer / Xcode / DerivedData / tutorial-gsmmwsvdohwbiqforobplztheaso / Build / Intermediates / tutorial.build / Debug / tutorial.build / Objects-normal / x86_64 / tutorial.o中的重复符号_main /Users/timpark/Library/Developer/Xcode/DerivedData/tutorial-gsmmwsvdohwbiqforobplztheaso/Build/Intermediates/tutorial.build/Debug/tutorial.build/Objects-normal/x86_64/main.o for architecture x86_64“
答案 0 :(得分:3)
duplicate symbol _main
表示您在Targets / Compiled Sources下有多个main.m。检查并删除它。