1. 程式人生 > >ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1

ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1

報錯如下:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

且pod中有如下警告:
[!] The xxxxxxxxx [Debug] target overrides the OTHER_LDFLAGS build setting defined in Pods/Target Support Files/Pods-xxxxxx/Pods-xxxxx.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the

$(inherited)` flag, or
- Remove the build settings from the target.

[!] The xxxxxxxxxx [Release] target overrides the OTHER_LDFLAGS build setting defined in Pods/Target Support Files/Pods-xxxxxxx/Pods-xxxxxxxxxx.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the$(inherited)` flag, or
- Remove the build settings from the target.

這是引入第三方庫時所報錯,同時還說找不到你引入的那個標頭檔案,解決辦法是在你的target下的Framework Search Paths,Header Search Paths,Library Search paths下和Other Link Flags下增加一項 $(inherited),不需要刪除原來的,增加,然後再執行專案,即可解除報錯。