phonegap/phonegap-plugins — Issue #235: ios BarcodeScanner: does not compile / link when using ARC
Author: pmuellr
Created: 2011-11-15 16:09:44+00:00
State: open

Reports from the ml of issues of compiling the barcode scanner native code with ARC enabled:

> First error:
> file:///PGBarcodeScanner.mm: error: Semantic Issue: 'autorelease' is unavailable: not available in automatic reference counting mode
> file:///PGBarcodeScanner.mm: error: Automatic Reference Counting Issue: ARC forbids explicit message send of 'autorelease'
> file:///PGBarcodeScanner.mm: error: Automatic Reference Counting Issue: ARC forbids explicit message send of 'dealloc'
> file:///PGBarcodeScanner.mm: error: Semantic Issue: 'autorelease' is unavailable: not available in automatic reference counting mode
> ...
> And some undefined symbols???
>
> Undefined symbols for architecture armv7:
> "zxing::Result::getBarcodeFormat() const", referenced from: -[PGbcsProcessor captureOutput:didOutputSampleBuffer:fromConnection:] in PGBarcodeScanner.o
> "zxing::MultiFormatReader::MultiFormatReader()", referenced from: -[PGbcsProcessor captureOutput:didOutputSampleBuffer:fromConnection:] in PGBarcodeScanner.o
> "zxing::DecodeHints::DecodeHints()", referenced from: -[PGbcsProcessor captureOutput:didOutputSampleBuffer:fromConnection:] in PGBarcodeScanner.o
> "zxing::DecodeHints::addFormat(zxing::BarcodeFormat)", referenced from: -[PGbcsProcessor captureOutput:didOutputSampleBuffer:fromConnection:] in PGBarcodeScanner.o
> "zxing::ReaderException::ReaderException(char const*)", referenced from: -[PGbcsProcessor getLuminanceSourceFromSample:imageBytes:] in PGBarcodeScanner.o
> "zxing::Result::getText()", referenced from: -[PGbcsProcessor captureOutput:didOutputSampleBuffer:fromConnection:] in PGBarcodeScanner.o
> "zxing::HybridBinarizer::HybridBinarizer(zxing::Ref)", referenced from: -[PGbcsProcessor captureOutput:didOutputSampleBuffer:fromConnection:] in PGBarcodeScanner.o
> "typeinfo for zxing::ReaderException", referenced from: typeinfo for zxing::ReaderException*in PGBarcodeScanner.o
> GCC_except_table60 in PGBarcodeScanner.o
> "zxing::GreyscaleLuminanceSource::GreyscaleLuminanceSource(unsigned char*, int, int, int, int, int, int)", referenced from: -[PGbcsProcessor getLuminanceSourceFromSample:imageBytes:] in PGBarcodeScanner.o
> "zxing::BinaryBitmap::BinaryBitmap(zxing::Ref)", referenced from: -[PGbcsProcessor captureOutput:didOutputSampleBuffer:fromConnection:] in PGBarcodeScanner.o
> "zxing::String::getText() const", referenced from: -[PGbcsProcessor captureOutput:didOutputSampleBuffer:fromConnection:] in PGBarcodeScanner.o
> "typeinfo for zxing::IllegalArgumentException", referenced from:
> GCC_except_table60 in PGBarcodeScanner.o
> ld: symbol(s) not found for architecture armv7
> collect2: ld returned 1 exit status