最近我把google-cast-sdk升级到了最新版本,同时得到了如下的构建错误
/Users/kxue/Documents/ios_trunk/Pods/google-cast-sdk/GoogleCastSDK-ios-4.4.7_static/GoogleCast.framework/GoogleCast(filterkit_2a008340bdfaacbcf917e42c4c119879.o)
/Users/kxue/Documents/ios_trunk/Pods/google-cast-sdk/GoogleCastSDK-ios-4.4.7_static/GoogleCast.framework/GoogleCast(filterkit_1da3186a05aea8fa769cea2058201358.o)
duplicate symbol '_lrsFilterUp' in:
/Users/kxue/Documents/ios_trunk/Pods/google-cast-sdk/GoogleCastSDK-ios-4.4.7_static/GoogleCast.framework/GoogleCast(filterkit_2a008340bdfaacbcf917e42c4c119879.o)
/Users/kxue/Documents/ios_trunk/Pods/google-cast-sdk/GoogleCastSDK-ios-4.4.7_static/GoogleCast.framework/GoogleCast(filterkit_1da3186a05aea8fa769cea2058201358.o)
...
ld: 10 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)你知道怎么解决这个问题吗?用之前的版本google-cast-sdk 4.2.0不会出现这种情况,谢谢~
发布于 2020-04-17 02:51:07
这对我很有效。
在你的project.
"Other linker flags“
发布于 2021-12-09 22:34:08
我也有同样的问题,但我的情况是因为我的内部SDK podspec是如何设置的。根据Byron的回答,我设置子规范如下
s.subspec "SomeSubspec" do |sp|
sp.platform = :ios
// block of code to link flags according to Google Cast documentation
// make sure to not include -all_load
sp.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '-ObjC -lc++' }
sp.xcconfig = { 'ENABLE_BITCODE' => 'NO' }
sp.frameworks = "framework1", "framework2"
sp.source_files = "somepath/*.swift"
sp.dependency InternalSDK/Somesubspec
sp.ios.dependency 'google-cast-sdk', '4.4.8'
sp.ios.dependency anotherpod, '3.19.1'
sp.test_spec "Tests" do |test_spec|
// block of code to link flags according to Google Cast documentation
// make sure to not include -all_load
test_spec.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '-ObjC -lc++' }
test_spec.xcconfig = { 'ENABLE_BITCODE' => 'NO' }
test_spec.requires_app_host = true
test_spec.source_files = "somepath/*.swift"
end
endhttps://stackoverflow.com/questions/60872940
复制相似问题