ld: 1 duplicate symbol for architecture *** clang: error: linker command failed with exit code 1 (u

时间:2021-03-19 08:08:53

duplicate symbol _x in:

    /Users/app/Library/Developer/Xcode/DerivedData/ChinaEnterprise-evaxoeaznbkdasfxetdeypsnzxtx/Build/Intermediates/ChinaEnterprise.build/Debug-iphonesimulator/ChinaEnterprise.build/Objects-normal/i386/CompaniesViewController.o

    /Users/app/Library/Developer/Xcode/DerivedData/ChinaEnterprise-evaxoeaznbkdasfxetdeypsnzxtx/Build/Intermediates/ChinaEnterprise.build/Debug-iphonesimulator/ChinaEnterprise.build/Objects-normal/i386/IndexMainViewController.o

ld: 1 duplicate symbol for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)





这个常常遇到的问题,,,坑,

_x重复,搜索这两个类的x会发现重复,去掉一个就可以

我遇到的是静态变量重复const