我刚刚在一个新的iMac 10.10,Xcode6.1中构建了我的项目,它得到了下面的错误:
In file included from /System/Library/Frameworks/Security.framework/Headers/Security.h:54:
/System/Library/Frameworks/Security.framework/Headers/SecAccessControl.h:43:1: error: expected function body after function declarator
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/Availability.h:159:50: note: expanded from macro
'__OSX_AVAILABLE_STARTING'
#define __OSX_AVAILABLE_STARTING(_osx, _ios) __AVAILABILITY_INTERNAL##_osx
^
<scratch space>:43:1: note: expanded from here
__AVAILABILITY_INTERNAL__MAC_10_10
^这看起来不像我的项目问题,因为项目在我的MacOSX10.9,xcode6.1上构建得很好。,苹果为osx10.10 https://developer.apple.com/library/mac/documentation/General/Reference/APIDiffsMacOSX10_10SeedDiff/frameworks/Security.html做了一些api的改变。
我用谷歌搜索了这个错误,找到了另一个链接https://github.com/pipobscure/fsevents/issues/40,在那里其他人也遇到了这个错误,他通过重新安装命令行工具解决了这个问题。
但是对于我的问题,我重新安装了xcode和命令行工具。它不工作,错误仍然存在。
有没有人也遇到过这个错误,你是如何修复它的?
发布于 2014-12-11 11:48:05
使用OSX SDK 10.10后,此错误不存在。
https://stackoverflow.com/questions/27340038
复制相似问题