项目加入百度导航错误
错误提示:
/Users/xxxxxx/Library/Developer/Xcode/DerivedData/project-bayynvernsehfqbjjbzxrksdlofm/Build/Intermediates/project.build/Debug-iphonesimulator/project.build/Objects-normal/i386/RTLabel.o
/Users/xxxxxx/Desktop/project/project/library/BaiduNaviSDK/libbaiduNaviSDK.a(RTLabel.o)
duplicate symbol _OBJC_METACLASS_$_RTLabel in:
/Users/xxxxxx/Library/Developer/Xcode/DerivedData/project-bayynvernsehfqbjjbzxrksdlofm/Build/Intermediates/project.build/Debug-iphonesimulator/project.build/Objects-normal/i386/RTLabel.o
/Users/xxxxxx/Desktop/project/project/library/BaiduNaviSDK/libbaiduNaviSDK.a(RTLabel.o)
duplicate symbol _OBJC_METACLASS_$_RTLabelButton in:
/Users/xxxxxx/Library/Developer/Xcode/DerivedData/project-bayynvernsehfqbjjbzxrksdlofm/Build/Intermediates/project.build/Debug-iphonesimulator/project.build/Objects-normal/i386/RTLabel.o
/Users/xxxxxx/Desktop/project/project/library/BaiduNaviSDK/libbaiduNaviSDK.a(RTLabel.o)
duplicate symbol _OBJC_METACLASS_$_RTLabelComponent in:
/Users/xxxxxx/Library/Developer/Xcode/DerivedData/project-bayynvernsehfqbjjbzxrksdlofm/Build/Intermediates/project.build/Debug-iphonesimulator/project.build/Objects-normal/i386/RTLabel.o
/Users/xxxxxx/Desktop/project/project/library/BaiduNaviSDK/libbaiduNaviSDK.a(RTLabel.o)
duplicate symbol _kReachabilityChangedNotification in:
/Users/xxxxxx/Library/Developer/Xcode/DerivedData/project-bayynvernsehfqbjjbzxrksdlofm/Build/Intermediates/project.build/Debug-iphonesimulator/project.build/Objects-normal/i386/Reachability.o
/Users/xxxxxx/Desktop/project/project/library/BaiduNaviSDK/libbaiduNaviSDK.a(BNReachability.o)
ld: 23 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
注意错误中加粗文字,从报错可以看出和RTLabel这个类有关,项目中有这个类,但是百度导航中没有,猜测是不是百度有封装到静态库中,所以重复了,尝试着把项目中的RTLabel类和用到的地方全部改了名字,成功,不再报RTLabel这个类的错误了,但出现另外的问题
ld: warning: path '/Users/xxxxxx/Desktop/project/project/library/libWeChatSDK.a' following -L not a directory
duplicate symbol _kReachabilityChangedNotification in:
/Users/xxxxxx/Library/Developer/Xcode/DerivedData/project-bayynvernsehfqbjjbzxrksdlofm/Build/Intermediates/project.build/Debug-iphonesimulator/project.build/Objects-normal/x86_64/Reachability.o
/Users/xxxxxx/Desktop/project/project/library/BaiduNaviSDK/libbaiduNaviSDK.a(BNReachability.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
问题所指:和Reachability类的kReachabilityChangedNotification通知有关,同样的方法,把此通知换个名字,在跑次程序,全部OK