Yosemite上的Xcode 7:XCTest不再以.mm objective-c++;文件夹
在OSX Yosemite(10.10.5)上更新到Xcode 7后,我的Yosemite上的Xcode 7:XCTest不再以.mm objective-c++;文件夹,xcode,macos,osx-yosemite,xcode7,objective-c++,Xcode,Macos,Osx Yosemite,Xcode7,Objective C++,在OSX Yosemite(10.10.5)上更新到Xcode 7后,我的.mmXTest文件现在无法编译。我得到以下错误: In file included from /Users/.../unit_test.mm:9: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/H
.mm
XTest文件现在无法编译。我得到以下错误:
In file included from /Users/.../unit_test.mm:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.h:32:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Security.framework/Headers/SecItem.h:985:49: error: expected ';' after top level declarator
extern const CFStringRef kSecUseAuthenticationUI
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Security.framework/Headers/SecItem.h:987:54: error: expected ';' after top level declarator
extern const CFStringRef kSecUseAuthenticationContext
^
...
它所抱怨的线路都是这样的:
extern const CFStringRef kSecUseAuthenticationUI
__OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
extern const CFStringRef kSecUseAuthenticationContext
__OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
鉴于其对这些声明没有异议:
extern const CFStringRef kSecUseItemList
__OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_2_0);
看起来更新添加了\uuuuMac\u10\u11
行和.mm
文件,这些文件不再在OS 10.10上使用XCTest编译
除了升级到OS 10.11之外,有人知道其他解决方法吗
谢谢。我也有同样的问题。即使在Yosemite上,甚至在部署目标<10.11时,它似乎也希望使用10.11 SDK进行编译。你找到解决这个问题的办法了吗?没有。我很想听听(我刚刚从我的项目中删除了这些测试。):我没有使用它们,而且还没有改变代码。“蓝精灵:如果你有同样的问题来增加可见性,你应该投票赞成!啊,该死,我从基础上产生错误,所以我不能简单地删除Studio,而不是你可能正在寻找的答案。r、 但我的解决方案最终只是下载Xcode 6.4并将其安装到其他地方。这不是最好的解决方案,但足以满足我的需要。希望这能有所帮助!