We have been using the same 3rd party static library for years. All of a sudden in the Xcode 11 GM (not previous beta's nor Xcode 10) the ld linker has started throwing out hundreds of "duplicate symbol" messages for this library. They are warnings and not errors. Do anybody know what the issue is or what has changed?
Linker "duplicate symbol" warnings
Same issue.
It seems happening because of the -all_load new forced linker flag.
https://developer.apple.com/documentation/xcode_release_notes/xcode_11_release_notes
Static libraries are now always force-loaded in their entirety during linking, fixing most “unable to demangle” runtime errors. (47598583)
https://www.manpagez.com/man/1/ld/
-all_load Loads all members of static archive libraries.
Same issue.
As @Andrea Rizer mentioned, I removed -all_load from Other Linker flags in Build Settings and the code compiled successfully.
As @Andrea Rizer mentioned, I removed -all_load from Other Linker flags in Build Settings and the code compiled successfully.