Linker Command failed with exit code 1 (use -v to see invocation), Xcode 8, Swift 3

前端 未结 25 1043
一生所求
一生所求 2020-11-28 04:28

I can\'t get rid of this error!

I have tried all sorts of things like clearing Derived Data(Preferences->Locations->click gray arrow to open Derived Data fo

相关标签:
25条回答
  • 2020-11-28 05:05

    It seems like the issue is different for most of us, and the error message has decent info. In my case, the Deployment Target was set to 10.13 by the export MACOSX_DEPLOYMENT_TARGET=10.13 line, but I was running 10.14. So I had to switch my Deployment Target to 10.14 in General > Deployment Info, in order for the ITLibrary-related symbols to be available again.

    cd /Users/foo/src/scrobble/macos/itunes-scrobble
        export MACOSX_DEPLOYMENT_TARGET=10.13
    
    ... SNIP ...
    
    Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_ITLibMediaItem", referenced from:
          objc-class-ref in AppDelegate.o
      "_OBJC_CLASS_$_ITLibPlaylist", referenced from:
          objc-class-ref in AppDelegate.o
      "_OBJC_CLASS_$_ITLibrary", referenced from:
          objc-class-ref in AppDelegate.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    0 讨论(0)
  • 2020-11-28 05:06

    In my case I have change the Target name in my Podfile So it's create the same Error for me.

    Solution

    Just go project-> Build Phase->Link Binary with libraries Remove the old FrameWorks by click on minus button(-) And clean and Run again. It's work me.

    Remove Unwanted .framework.

    0 讨论(0)
  • 2020-11-28 05:06

    For me, the gem lock file was specifying an older version of cocoapods than the one I had installed. I had to re-branch and run bundle exec pod install instead of pod install

    0 讨论(0)
  • 2020-11-28 05:07

    Make sure the Find Implicit Dependencies checkbox is checked.

    (Product -> Scheme -> Edit Scheme -> Build -> Find Implicit Dependencies)

    0 讨论(0)
  • 2020-11-28 05:08

    I had the same problem. If you are checking out any github project, then instead of using git clone, use git lfs clone, as sometimes, some large files are not properly cloned by using git only. Also, make sure your bitcode is disabled.

    0 讨论(0)
  • 2020-11-28 05:09

    did you try a clean? cmd + shift + k

    0 讨论(0)
提交回复
热议问题