Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

build error on iOS 7.1 - Zxing

Updated to XCODE 5.1/IOS 7.1 and tried to build my project which included Zxing library. Getting the following error:

/Zxing/cpp/core/src/zxing/ChecksumException.h:3:9: '__CHECKSUM_EXCEPTION_H__' is used as a header guard here, followed by #define of a different macro

Error is occurring for the following code,

#ifndef __CHECKSUM_EXCEPTION_H__   //this line causes the error.
#define __NOT_FOUND_EXCEPTION_H__

.....

.....

#endif // __CHECKSUM_EXCEPTION_H__

Everything was perfect before the xcode 5.1 update.

I suspect recent migration of IOS 7.1 to support 64-bit architecture causes this error but i'm not sure.

I tried to remove 64-bit support from the Zxing library using this link but still it's not working.

Any help or suggestion would be greatly appreciated.

like image 443
ashai Avatar asked Mar 14 '14 17:03

ashai


1 Answers

Looks like there are some underground compiler settings changes in XCode 5.1.

So to fix this issue you need add -w flag to ZXingWidget Other Warning Flags. This flag completely disable all compiler warnings.

  1. Select ZXingWidget framework.
  2. Select ZXingWidget target in ZXingWidget framework.
  3. Press Build setting tab and type "other wa" in search.
  4. Add -w parameter flag to Other Warning Flags.

Here is a screen with steps how to add this flag: How to add -w other warning flag screen

like image 185
CTiPKA Avatar answered Sep 21 '22 18:09

CTiPKA