Xcode 在错误的位置查找 CFNetwork 框架

发布于 2024-12-04 05:01:12 字数 4433 浏览 1 评论 0原文

如果这是我正在做的愚蠢的事情,我不会感到惊讶......这是一个 iOS 目标项目。

  • MacOS:10.7 Lion
  • Xcode:4.1
  • 目标:iPhone 4.3

我在另一个项目中使用了 ASI 的 ASIHTTPRequest 插件框架,它工作得很好。

我已将其添加到我正在处理的当前项目中,现在 Xcode 正在项目目录而不是 SDK 位置中查找 CFNetwork 框架。我尚未添加任何搜索位置,并已验证 CFNetwork 框架位置设置为“相对于 SDK”,并且正在查看“System/Library/Frameworks”目录。

正如您在错误消息底部看到的,它正在错误的框架文件夹中查找 - 它正在项目文件夹内查找。

如果您对我做错了什么有任何想法,请告诉我。

谢谢!

错误信息:

CompileC /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/Objects-normal/i386/ASIDownloadCache.o ASIDownloadCache.m 正常i386 Objective-C com.apple.compilers.llvm.clang.1_0.compiler cd /Volumes/One.One/Development/Cam-MoonCo_TabBar/MoonCo_CustomTabBar setenv LANG en_US.US-ASCII setenv PATH“/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin” /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -x Objective-c -arch i386 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics -parseable-fixits -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -DDEBUG -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -fexceptions -fasm-blocks -mmacosx-版本-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=属性((iboutlet))" "-DIBOutletCollection(ClassName)=属性((iboutletcollection (ClassName)))" "-DIBAction=void)属性((ibaction)" -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -iquote /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/MoonCo_TiltFinder- generated-files.hmap -I/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/MoonCo_TiltFinder-own-target-headers.hmap -I/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/MoonCo_TiltFinder-all-target-headers.hmap -iquote /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/MoonCo_TiltFinder-project-headers.hmap -I/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Products/Debug-iphonesimulator/include -I/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/DerivedSources/i386 -I/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/DerivedSources -F/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Products/Debug-iphonesimulator -F/Volumes/One.One/Development/Cam-MoonCo_TabBar/MoonCo_CustomTabBar -include /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/PrecompiledHeaders/MoonCo_CustomTabBar-Prefix-ezvknrzjsqbjxdfzxcnzjkisdtlw/MoonCo_CustomTabBar-Prefix.pch -MMD -MT 依赖项 -MF /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/Objects-normal/i386/ASIDownloadCache.d -c /Volumes/One.One/Development/Cam-MoonCo_TabBar/MoonCo_CustomTabBar/ASIDownloadCache.m -o /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/Objects-normal/i386/ASIDownloadCache.o

致命错误:无法打开文件“/Volumes/One.One/Development/Cam-MoonCo_TabBar/MoonCo_CustomTabBar/CFNetwork.framework/Headers/CFHTTPMessage.h”:

I wouldn't be surprised if this is something stupid that I'm doing... This is an iOS target project.

  • MacOS: 10.7 Lion
  • Xcode: 4.1
  • Target: iPhone 4.3

I used ASI's ASIHTTPRequest add-in framework in a different project and it worked fine.

I've added it to the current project I'm working on and now Xcode is looking for the CFNetwork framework in a project directory instead of the SDK location. I have not added any search locations and have verified that the CFNetwork framwork location is set to "Relative to SDK" and is looking at the "System/Library/Frameworks" directory.

As you can see at the bottom of the error message, it is looking in the wrong folder for the framework—it is looking inside the project folder.

Please let me know if you have any thoughts as to what I am doing wrong.

Thanks!

Error message:

CompileC /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/Objects-normal/i386/ASIDownloadCache.o ASIDownloadCache.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Volumes/One.One/Development/Cam-MoonCo_TabBar/MoonCo_CustomTabBar
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -DDEBUG -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -fexceptions -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=attribute((iboutlet))" "-DIBOutletCollection(ClassName)=attribute((iboutletcollection(ClassName)))" "-DIBAction=void)attribute((ibaction)" -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -iquote /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/MoonCo_TiltFinder-generated-files.hmap -I/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/MoonCo_TiltFinder-own-target-headers.hmap -I/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/MoonCo_TiltFinder-all-target-headers.hmap -iquote /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/MoonCo_TiltFinder-project-headers.hmap -I/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Products/Debug-iphonesimulator/include -I/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/DerivedSources/i386 -I/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/DerivedSources -F/Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Products/Debug-iphonesimulator -F/Volumes/One.One/Development/Cam-MoonCo_TabBar/MoonCo_CustomTabBar -include /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/PrecompiledHeaders/MoonCo_CustomTabBar-Prefix-ezvknrzjsqbjxdfzxcnzjkisdtlw/MoonCo_CustomTabBar-Prefix.pch -MMD -MT dependencies -MF /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/Objects-normal/i386/ASIDownloadCache.d -c /Volumes/One.One/Development/Cam-MoonCo_TabBar/MoonCo_CustomTabBar/ASIDownloadCache.m -o /Users/mooner/Library/Developer/Xcode/DerivedData/MoonCo_TiltFinder-gzpflywfciaabtachdctgqaarhmu/Build/Intermediates/MoonCo_TiltFinder.build/Debug-iphonesimulator/MoonCo_TiltFinder.build/Objects-normal/i386/ASIDownloadCache.o

fatal error: cannot open file '/Volumes/One.One/Development/Cam-MoonCo_TabBar/MoonCo_CustomTabBar/CFNetwork.framework/Headers/CFHTTPMessage.h':

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

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

发布评论

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

评论(1

绿萝 2024-12-11 05:01:12

有同样的问题。通过 Command Shift K 清理项目为我解决了这个问题。

Had the same problem. Cleaning the project via Command Shift K solved it for me.

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