错误:链接器命令失败:ld:重复符号_main

时间:2012-07-20 01:05:12

标签: xcode

  

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“

1 个答案:

答案 0 :(得分:3)

duplicate symbol _main表示您在Targets / Compiled Sources下有多个main.m。检查并删除它。