objective-cxcodeframeworksmach-obuild-settings

Xcode Linking - Command Ld failed with a nonzero exit code


I try to create an Objective-C Framework with Relocatable Object File for Mach-O Type in Xcode Build Settings.

When I build the framework, the command Ld failed with a nonzero exit code error appears. The error description is clang: error: invalid argument '-compatibility_version 1' only allowed with '-dynamiclib'. It will be fine if I change the Mach-O Type with Dynamic Library.

Do you guys know how to fix this error with Relocatable Object File without change to Dynamic Library?


Solution

  • I found the answer when I change the Compatibility Version and Current Library Version to an empty text