基础框架。没有 NSString.h 文件

发布于 2024-10-08 06:33:00 字数 1374 浏览 5 评论 0原文

在通过 SVN 更新工作副本后,我遇到了一些错误。

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:8:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:8:32: error: Foundation/NSString.h: No such file or directory

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:45:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:45: error: expected ')' before 'unichar'

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSPathUtilities.h:10:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSPathUtilities.h:10: error: cannot find interface declaration for 'NSString'

所有这些错误都表明编译器无法在 Foundation 框架中找到 NSString.h 文件,并且我已在 Xcode/Frameworks/Foundation.framework/Headers 中打开 Foundation 框架,并注意到那里没有 NSString 头文件。谁能告诉我发生了什么事吗?我尝试删除框架并再次添加它,但失败了。我仍然没有 NSString 头文件。

I'm getting a few errors just after I updated my working copy via SVN.

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:8:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:8:32: error: Foundation/NSString.h: No such file or directory

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:45:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:45: error: expected ')' before 'unichar'

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSPathUtilities.h:10:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSPathUtilities.h:10: error: cannot find interface declaration for 'NSString'

All that errors tell that compiler is unable to find NSString.h file in Foundation framework and I have opened the Foundation framework in Xcode/Frameworks/Foundation.framework/Headers and noticed that there is no NSString header file there. Could anyone tell me what happened? I tried to delete the framework and add it again but it failed to. Still I don't have NSString header file.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

紙鸢 2024-10-15 06:33:00

我在 XCode 3 中启动的项目中遇到了这个问题,现在在 XCode 4 中编译,该行

 -#include <Foundation/NSString.h>

被标记为没有这样的文件。我通过重新添加框架来修复它 - 尽管它已经出现在我的项目中(从我在 XCode 3 中添加它时开始),使用以下方法:

如何在 Xcode 4 中“添加现有框架”?

我注意到使用此方法看到的列表没有包括基础框架。

I had this problem in a project started in XCode 3 and now compiled in XCode 4, where the line

 -#include <Foundation/NSString.h>

was flagged as no such file. I fixed it by re-adding the framework - although it was already appearing in my project (from when I had added it in XCode 3) using this approach:

How to "add existing frameworks" in Xcode 4?

I noticed the list seen by using this method did not include the Foundation framework.

倾其所爱 2024-10-15 06:33:00

尝试再次安装 XCode。不再支持较旧的 SDK 版本。选择 SDK 4.2 并重新编译。 (我已经复制了 SDK 4.0 以实现向后兼容性,但它没有显示在目标和项目设置中)

try installing XCode again. Older SDK versions are no longer supported. Choose SDK 4.2 instead and compile it again. (I have copied the SDK 4.0 for backward compatibility but it is not shown in targets and project settings)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文