V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
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
zioc
V2EX  ›  iDev

AFNetworking 报错

  •  
  •   zioc · 2015-01-07 19:44:01 +08:00 · 3317 次点击
    这是一个创建于 3390 天前的主题,其中的信息可能已经有所发展或是发生改变。

    self.state = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(state))] integerValue];
    编译不通过,这个怎么整

    错误是
    assigning to 'AFOperationState' from incompatible type ‘NSInteger’ (aka 'long')

    不只这一处是这样..

    6 条回复    2015-01-11 19:53:41 +08:00
    Seakey
        1
    Seakey  
       2015-01-07 19:54:52 +08:00
    我以前在未设置好C++编译条件时,遇到过这个错误
    huixsx
        2
    huixsx  
       2015-01-07 20:56:09 +08:00
    warning 当做error处理了,直接关掉哪个
    zioc
        3
    zioc  
    OP
       2015-01-07 21:36:25 +08:00
    @huixsx 怎么处理?
    zioc
        4
    zioc  
    OP
       2015-01-07 21:37:25 +08:00
    @Seakey 是的,有可能。Compile sources as 设成了Objective C++,因为使用了百度地图的原因。求具体的办法
    zioc
        5
    zioc  
    OP
       2015-01-07 21:40:35 +08:00
    @Seakey
    @huixsx
    貌似解决了。就是把 Compile sources as 改回默认,然后改一个文件为.mm
    rannie
        6
    rannie  
       2015-01-11 19:53:41 +08:00
    嗯 加oc++会有这个问题 需要一个文件为.mm
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1009 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:05 · PVG 03:05 · LAX 12:05 · JFK 15:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.