问题
Different projects using ZXing have error after last Xcode update:
Error messages are:
- private field 'cached_y_' is not used
- Private field 'bits_' is not used
- Private field 'cached_row_num_' is not used
- Private field 'dataHeight_' is not used
Any compiler flag I have to set up?
回答1:
Just add this flag
-Wno-unused-private-field
under ZXingWidget target -> Build Settings -> Other Warning Flags. Click the + button and paste the flag, clean and build again.
(No need to remove any other flag, just ignore unused private field warning)
回答2:
Here is a workaround to get it to compile. You have remove couple compile warning flags:
Select the xzing project, build settings, look for "Other Warning Flags" and remove -Werror and -Wno-unused-parameter
回答3:
They have the project set up to treat warnings as errors. Turn off that setting and it should compile, so you can at least run the sample code.
Also tell them so they can fix the warnings.
回答4:
Looks like this is a temporary fix http://code.google.com/p/zxing/issues/detail?id=1494 I hope for a much nicer solution soon.
来源:https://stackoverflow.com/questions/14593291/xcode-4-6-zxing-compile-error-after-xcode-update-4h127