Linker command failed with exit code 1 (duplicate symbol)

∥☆過路亽.° 提交于 2019-12-01 22:29:31

Look up in your project for:

MakeStringCopy

And make sure it exists (if exists) only once. If it appears more then once, rename one (make sure to rename it where it being called as well) and try to build again.

I have recently face the same issue. I know Umer Azeem got the answer but to help someone else who may suffer from the same issue I was in.
According to my application flow I am using printer related third party class to print. To use that I have created object of that class in both of my files ImagePrintViewController and PrintResultViewController separately and passed required data to it.

In my scenario I am getting same error with variable name like _printerSetup in two of my files/Library/Developer/Xcode/DerivedData/../x86_64/ImagePrintViewController.o and /Library/Developer/Xcode/DerivedData/../x86_64/PrintResultViewController.o.
I have search in both of my file for the above variable name. But I couldn't find that.

After searching long on this I got a idea to delete reference of my second file i.e. BRPrintResultViewController.h and BRPrintResultViewController.m after merging code in my first file.

With this I found my solution and my code runs fine after this.

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