duplicate symbols for architecture arm64 after Xcode 8.0 update

前端 未结 10 1430
再見小時候
再見小時候 2020-12-31 08:46

I get duplicate symbols error after I updated my Xcode. (find the code down) Does anybody get this too? And how could be solved?

I tried to remove

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-31 09:07

    for my case, Xcode 9 , we were declaring constants in some header file

    Constants.h

    static NSString *const kSomeString = @"SomeString";
    

    so importing Constants.h in multiple .m files causes the duplicated symbols

    Solution:

    Constants.h

    extern NSString * const kSomeString;
    

    Constants.m

    NSString *const kSomeString = @"SomeString";
    

提交回复
热议问题