Apple Mach -O Linker command failed

2019-02-21 09:41发布

random issue is happening

After updating my POD install, Xcode sprouted a new issue:

16条回答
够拽才男人
2楼-- · 2019-02-21 09:53

There are several cases that cause this issue. At the moment, this question has no any accepted answer and also I found another solution for the same issue, I am posting my answer/experience here.

In you application, go to Target -> Build Settings, then you will find following attributes.

  • CLANG_WARN_INFINITE_RECURSION
  • CLANG_WARN_SUSPICIOUS_MOVE
  • GCC_NO_COMMON_BLOCKS

Set values for those as NO, then clean and build the project.

查看更多
Ridiculous、
3楼-- · 2019-02-21 09:54

Remove the local files of WikitudeSDK from target. Xcode is getting confused between the paths of library, which one to chose- pod or local.

Also try reinstalling podfile and remove wikitude from pod file to. IN linker search path settings, in build settings, check the paths mentioned to find the required library.

Lastly install gems before updating pods

查看更多
beautiful°
4楼-- · 2019-02-21 09:54

First thing you have to do is to delete the files in /Users/Yourname/Library/Developer/Xcode/DerivedData/YourAppName-xxxx and then restart your Xcode. That is no joke!

If you got an error like "duplicate symbol_OBJC_CLASS_$_Pod in:", you should go to TARGETS->Build Phases->Compile Sources and delete extra file.

查看更多
我想做一个坏孩纸
5楼-- · 2019-02-21 09:56

I experienced the error when overwriting project.

Still encountered the error after:

Error was solved after changing to a different branch in github but perhaps one of the other troubleshooting methods played a part. Now all branches run on xcode without the Mach -O Linker Error.

查看更多
爱情/是我丢掉的垃圾
6楼-- · 2019-02-21 09:57

Close you project and go to project path and select your project with .xcworkspace instead of .xcodeproj. Reason your existing project doesn't contain any library you linked.

ss

查看更多
迷人小祖宗
7楼-- · 2019-02-21 09:58

I had faced the same issue. I declared two classes with same name. Therefore it was conflicting with the class name. It worked for me after updation of class name.

查看更多
登录 后发表回答