Xcode Linking - Command Ld failed with a nonzero exit code

Viewed 3818

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?

2 Answers

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

Remove STSecurity framework and keychain access if you are getting Ld failed with nonzero.

Screenshot

1

Related