V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
adow
V2EX  ›  iDev

升级到 Xcode5.1, iOS 7.1 之后,zxing 编译出错了,求帮助

  •  
  •   adow ·
    adow · Mar 11, 2014 · 6975 views
    This topic created in 4442 days ago, the information mentioned may be changed or developed.
    编译时zxing的ChecksumException.h 中

    ````
    #ifndef __CHECKSUM_EXCEPTION_H__
    #define __NOT_FOUND_EXCEPTION_H__
    ````

    '__CHECKSUM_EXCEPTION_H__' is used as a header guard here, followed by #define of a different macro

    我把#define 里改成__CHECKSUM_EXCEPTION_H__ 后又在zxing其他地方有编译错误了。

    在Xcode 5.0.2 中确实没有问题的,我想是不是5.1的编译器参数有不一样了吗?
    8 replies    1970-01-01 08:00:00 +08:00
    txx
        1
    txx  
       Mar 11, 2014   ❤️ 1
    我改了一下...其他地方都是 unused 错误...用 宏 标记一下 就好了 http://stackoverflow.com/questions/18423449/ignore-unused-entity-issue-unused-variable-in-a-single-file

    应该可以修改编译选项 关闭掉...
    run2
        2
    run2  
       Mar 11, 2014   ❤️ 1
    zxing 的iOS 分支不是关了么?
    用的port版本?
    txx
        3
    txx  
       Mar 11, 2014
    @sobigfish 关了是因为iOS 7 内置了....但是你 5 6 不能不管啊...
    run2
        4
    run2  
       Mar 11, 2014
    @txx 其实是可以的:) 现在还用iOS5、6的都不是优质客户群 至少在某些产品定位上
    txx
        5
    txx  
       Mar 11, 2014
    @sobigfish 我那天还收到客户投诉呢...一个渠道商的3gs装不了....一问是4.3的系统.......
    jeremyLyu
        6
    jeremyLyu  
       Mar 20, 2014   ❤️ 1
    在工程ZXingWidget中的 build settings
    在 Apple LLVM 5.1 - Custom Compiler Flags项目中
    将Other Warning Flags的所有项目给删除掉。
    然后 重新编译就可以了
    bingyingu
        7
    bingyingu  
       Apr 9, 2014
    6楼正解哦!
    这样删除不知道,有什么后遗症吗?
    gancl
        8
    gancl  
       Apr 13, 2014
    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.

    Select ZXingWidget framework.
    Select ZXingWidget target in ZXingWidget framework.
    Press Build setting tab and type "other wa" in search.
    Add -w parameter flag to Other Warning Flags.
    Here is a screen with steps how to add this flag:


    http://stackoverflow.com/questions/22411565/build-error-on-ios-7-1-zxing
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2795 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 01:43 · PVG 09:43 · LAX 18:43 · JFK 21:43
    ♥ Do have faith in what you're doing.