Error with connecting a static pod library swiftCompatibility56

The third party library began to support only the static cocoapods library. Before that, it was connected as dynamic

After changing the dynamic library to a static one, such an error began to appear

Please help me figure this out:

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

Replies

PS. I have Xcode 14.2

In my case we had to build the static library using the same Xcode version that our main app is compiled in. I'm not sure this is any help since you're not in control of build the static library you're pulling in.

  • Hi, what do you mean by "build the static library"? I've been stuck in the same situation for a couple of days and haven't being able to move forward

Add a Comment