5

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?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Kiel
  • 235
  • 2
  • 8

2 Answers2

2

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

Kiel
  • 235
  • 2
  • 8
0

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

Screenshot

1

vimuth
  • 5,064
  • 33
  • 79
  • 116