6 duplicate symbols for architecture i386

徘徊边缘 提交于 2019-11-27 23:46:43

As you can see the linker complains that SBJsonWriter and SBJsonParser are both defined in libfacebook_ios_sdk.a and as individual files in your project.

You cannot really solve the problem except removing the individual files from your target.

The problem is that the developers of libfacebook_ios_sdk.a thought it would be a good idea to use the json framework (not caring for clashes with code used in the host app). This is a common problem with SDKs on iOS.

I had resolved issues please follow step.

  1. Goto application's target
  2. Compile Sources
  3. Remove duplicate file using (-).

The problem is most likely due to a typo when including the header. Check so that the header file (.h) is included and not the implementation file (.m).

This was the issue for me

Something that often helps if nothing else works is to open your .pbxcodeproj file with a text editor and grep for the name of the class that is coming up in the failure log in Xcode. There might be two duplicate lines - delete one of them.

You must have added SBJsonParser.h/.m twice in the project.

It seems you probably have some .h/.m file included twice like included some third party API/library twice, or you created some new file whose name is exactly same as already available file in project. Check out if you have any files which is duplicate in your project folder.

You also can:

  1. Copy .h files of conflict pods.
  2. Delete these conflict pods from podfile.
  3. Copy these .h files to project.
  4. Rename at #import </.h> to ".h" of copied .h files.
  5. Make pod install and bulid.

The trick is your code have no error because .h files imported, but .o files link correctly.

if you import any of your .h file twice it happens.

For example If you import any .h file both ....ViewController.h and ....ViewController.m file it happens.

If above all don't solve your issue, check whether you declare a constant in two different files(I mean check if you have two same(.h &.m) files. Duplicate files should not be there in your project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!