Search code examples
iosipadlinkerbarcode-scannerarm7

Redlaser SDK is conflicting with Scandit SDK


    duplicate symbol _OBJC_IVAR_$_Decoder.image in:
     /Users/......./ScanditSDK/libscanditsdk-iphone-2.1.11.a(Decoder-3DF771F40A970F8E.o)
     /Users/......./RedLaser/libRedLaserSDK.a(Decoder-DD22F2D71AAA0F2E.o)

   duplicate symbol _OBJC_IVAR_$_Decoder.cropRect in:
    /Users/......./ScanditSDK/libscanditsdk-iphone-2.1.11.a(Decoder-3DF771F40A970F8E.o)
    /Users/......./RedLaser/libRedLaserSDK.a(Decoder-DD22F2D71AAA0F2E.o)

................................................................
................................................................
   ld: 20 duplicate symbols for architecture armv7
   clang: error: linker command failed with exit code 1 (use -v to see invocation)

When I try to import both RedLaser and Scandit SDK, I get these duplicate symbols issue. Can anyone help to solve this issue...

Thanks in advance.


Solution

  • It looks like both libraries have a class with the same name. This is not unusual, since they are solving the same problem: scanning and decoding barcodes.

    You can't avoid this error without one of the providers change the name of the class. Contact them with your problem.

    In fact, as SDK providers, RedLaser and Scandit should definitely use namespaces by default. One of the big reasons for using namespaces is to avoid duplicate symbol errors.

    Your other option is to remove one of the libraries (or both), and use some other barcode scanning SDK, like ZXing, Zbar, or pdf417.mobi