Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
537 views
in Technique[技术] by (71.8m points)

c++ - 项目中的文件无法运行,无法交换。 它们之间也有问题-/重复符号/(Files in the project doesn't run, can't swap. between them and also there is a problem - /duplicate symbols/)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...