Xcode,重复符号 _main [英] Xcode, Duplicate symbol _main
问题描述
我有重复的符号 _main.
I have duplicate symbol _main.
问题是它说/Users/.../i386/main-B9843B6026D6EFA4.o和/Users/.../i386/main-B9843B6026D6EFA4.o中的重复符号_main",XXX和XXX实际上是相同的 .o 文件.我不知道为什么当它是相同的 .o 时它认为它是重复的符号?!
The problem is it says "Duplicate symbol _main in /Users/.../i386/main-B9843B6026D6EFA4.o and /Users/.../i386/main-B9843B6026D6EFA4.o", the XXX and XXX are actually the same .o file. I don't know why it thinks it's duplicate symbol when it's the same .o?!
感谢任何帮助,谢谢.
推荐答案
啊..我发现我在 Targets/Compiled Sources 下有多个条目(在较新的 XCode 中它在 Build Phases/Compile Sources 下).我删除了它们,问题就解决了.多条目的事情可能与 Git 合并有关.
Ah..I figure out it's that I have multiple entries under Targets/Compiled Sources ( in newer XCode it's under Build Phases/Compile Sources ). I removed them and the problem is solved. The multiple entry thing probably has to do with Git merge.
这篇关于Xcode,重复符号 _main的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!