第三方库开始只支持静态cocoapods库。在此之前,它被连接为动态的
将动态库改为静态库后,这样的错误开始出现
请帮我弄清楚这一点:Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibility56
ld: warning: Could not find or use auto-linked library 'swiftCompatibility56'
ld: warning: Could not find or use auto-linked framework '<Name>'
ld: warning: Could not find or use auto-linked framework '<Name>'
ld: warning: Could not find or use auto-linked framework '<Name>'
Undefined symbols for architecture arm64:
"__swift_FORCE_LOAD_$_swiftCompatibility56", referenced from:
__swift_FORCE_LOAD_$_swiftCompatibility56_$_<someName> in <ThirdPartyLibrary>.a(File.o)
__swift_FORCE_LOAD_$_swiftCompatibility56_$<ThirdPartyLibrary> in <ThirdPartyLibrary>.a(File.o)
__swift_FORCE_LOAD_$_swiftCompatibility56_$<ThirdPartyLibrary> in <ThirdPartyLibrary>.a(File.o)
__swift_FORCE_LOAD_$_swiftCompatibility56_$<ThirdPartyLibrary> in <ThirdPartyLibrary>.a(File.o)
__swift_FORCE_LOAD_$_swiftCompatibility56_$<ThirdPartyLibrary> in <ThirdPartyLibrary>.a(File.o)
__swift_FORCE_LOAD_$_swiftCompatibility56_$<ThirdPartyLibrary> in <ThirdPartyLibrary>.a(File.o)
__swift_FORCE_LOAD_$_swiftCompatibility56_$<ThirdPartyLibrary> in <ThirdPartyLibrary>.a(File.o)
...
(maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibility56_$_<ThirdPartyLibrary>, __swift_FORCE_LOAD_$_swiftCompatibility56_$_<ThirdPartyLibrary> , __swift_FORCE_LOAD_$_swiftCompatibility56_$_<ThirdPartyLibrary> )
ld: symbol(s) not found for architecture arm64
P.S.我的podfile不包含行use_frameworks!
Xcode 14.2
1条答案
按热度按时间k5hmc34c1#
在应用中添加一个Swift文件,让Xcode知道它需要在Swift系统库中进行链接,以满足二进制库的依赖关系。