I code in C++ in Xcode and have that problem :
(我在Xcode中用C ++编写代码并遇到了这个问题:)
duplicate symbol '_main' in:
/Users/admin/Library/Developer/Xcode/DerivedData/stepic-czeoumulvkebkydlwswhywbxwqvw/Build/Intermediates.noindex/stepic.build/Debug/stepic.build/Objects-normal/x86_64/4.main.o
/Users/admin/Library/Developer/Xcode/DerivedData/stepic-czeoumulvkebkydlwswhywbxwqvw/Build/Intermediates.noindex/stepic.build/Debug/stepic.build/Objects-normal/x86_64/vector.main.o
duplicate symbol '_main' in:
/Users/admin/Library/Developer/Xcode/DerivedData/stepic-czeoumulvkebkydlwswhywbxwqvw/Build/Intermediates.noindex/stepic.build/Debug/stepic.build/Objects-normal/x86_64/4.main.o
/Users/admin/Library/Developer/Xcode/DerivedData/stepic-czeoumulvkebkydlwswhywbxwqvw/Build/Intermediates.noindex/stepic.build/Debug/stepic.build/Objects-normal/x86_64/theory.main.o
duplicate symbol '_main' in:
/Users/admin/Library/Developer/Xcode/DerivedData/stepic-czeoumulvkebkydlwswhywbxwqvw/Build/Intermediates.noindex/stepic.build/Debug/stepic.build/Objects-normal/x86_64/4.main.o
/Users/admin/Library/Developer/Xcode/DerivedData/stepic-czeoumulvkebkydlwswhywbxwqvw/Build/Intermediates.noindex/stepic.build/Debug/stepic.build/Objects-normal/x86_64/7taskmain.o
ld: 3 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
can anyone help?
(有人可以帮忙吗?)
why it writes duplicate /main/ from different files? (为什么它从不同的文件写入重复的/ main /?)
ask by Andrey Sheremeev translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…