简体   繁体   English

帐户框架的词汇或预处理器问题

[英]Lexical or Preprocessor Issue with Accounts framework

I recently installed the latest Facebook iOS SDK and included the Accounts framework for use with it. 我最近安装了最新的Facebook iOS SDK,并包括了与之配合使用的Accounts框架。 While I don't think the issue is related to the Facebook iOS SDK, I thought I'd mention it. 虽然我认为该问题与Facebook iOS SDK没有关系,但我想提到它。

The error I'm getting when I compile now is this: 我现在编译时遇到的错误是:

Pasting formed '_ MAC @', an invalid preprocessing token 粘贴形成的'_ MAC @',无效的预处理令牌

There are 3 of these errors, all within the Accounts framework header files that I cannot edit. 这些错误中有3个,全部属于我无法编辑的Accounts框架头文件。

I'm using the default compiler: Apple LLVM compiler 4.2 with XCode version 4.6.3 我使用的是默认编译器:具有XCode版本4.6.3的Apple LLVM编译器4.2

I tried researching this issue for hours to no avail. 我尝试研究这个问题数小时都无济于事。

UPDATE: I tried compiling with Apple LLVM compiler 5.0 in XCode 5 Beta and I get even more compiler errors related to the Accounts framework. 更新:我尝试在XCode 5 Beta中使用Apple LLVM编译器5.0进行编译,但是我得到了更多与Accounts框架相关的编译器错误。

UPDATE: I started a totally new project and rebuilt it from scratch. 更新:我开始了一个全新的项目,并从头开始对其进行了重建。 The same issue persists. 同样的问题仍然存在。 As of now, it seems like my only option is to not use the new Facebook SDK or Accounts framework. 到目前为止,似乎我唯一的选择是不使用新的Facebook SDK或Accounts框架。 I'm surprised no one else has this issue. 我很惊讶没有其他人遇到这个问题。

Have you set the Accounts.framework as "optional" under target settings? 您是否已在目标设置下将Accounts.framework设置为“可选”? Make it "Optional" and then Clean, Build and Run Project. 将其设置为“可选”,然后清除,生成和运行项目。

Solved it. 解决了。 I had a #define that looked like this in the pch file: 我在pch文件中有一个#define看起来像这样:

#define NA @"-"

Note to self. 注意自我。 Do not use short define names in global header files. 不要在全局头文件中使用简短的定义名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM