Search code examples
iosxcodelinkerclanglinker-errors

Duplicate Symbol Error when Linking in Xcode: '_CRLF' | XCode 15.0 Beta 8


My app was working fine on XCode 14.6 and I was able to install it on my iPad.

For testing the app on my iPad on iOS 17 Beta, I updated both my iPad and XCode 14.6 to XCode 15 Beta 8.

Now when I am trying to install it, I get this error:

duplicate symbol '_CRLF' in:
    /Users/mac-0077/Desktop/HBook/eBook/Nov_2023/ebookapp copy/eBook/Third Party/PrinterLibrary/libPrinter_170b.a[arm64][4](ZPLPrinter.o)
    /Users/mac-0077/Desktop/HBook/eBook/Nov_2023/ebookapp copy/eBook/Third Party/PrinterLibrary/libPrinter_170b.a[arm64][3](CPCLPrinter.o)
ld: 1 duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see invocation)

If I am installing the app using XCode 14.6 on the simulator(iOS 16), it's working.

If I am installing the app using XCode 15.0 beta 8 on the iPad(iOS 17 Beta), it's not working giving the above error.

I have tried many things but nothing worked.

Any help or guidance provided would be greatly appreciated. Thank you in advance for taking the time to assist me!

Tried cleaning build folder, pod disintegration. Nothing worked.


Solution

  • https://developer.apple.com/forums/thread/731090 Build Setting Other Linker Flags add "-ld64"