ld: 警告: 选项中未找到目录 -- 删除派生数据和清理项目无效。

9
我将正在使用Xcode开发的应用程序的整个文件夹从计算机上的一个位置移动到另一个位置,然后收到了警告ld: warning: directory not found for option,后面跟着一条很长的路径。 我按照Apple Mach-O Linker errors and I don't know what to do中的答案操作,但仍收到相同的警告。 编辑:以下是我收到的消息,如果相关的话:
Ld /Users/joel/Library/Developer/Xcode/DerivedData/GayHaikuTabbed-aszefnihmscxaachdbimtmeozapo/Build/Products/Debug-iphonesimulator/GayHaikuTabbed.app/GayHaikuTabbed normal i386
cd /Users/joel/Development/GayHaiku
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/joel/Library/Developer/Xcode/DerivedData/GayHaikuTabbed-aszefnihmscxaachdbimtmeozapo/Build/Products/Debug-iphonesimulator -L/Users/joel/Development/GayHaiku/GayHaikuTabbed -L/Users/joel/Development/GayHaiku -F/Users/joel/Library/Developer/Xcode/DerivedData/GayHaikuTabbed-aszefnihmscxaachdbimtmeozapo/Build/Products/Debug-iphonesimulator -F. -FGayHaikuTabbed -FGayHaikuTabbedTests -F/Users/joel/Development/GayHaiku -F/Users/joel/Development/GayHaiku/../../../Downloads -F/Users/joel/Development/GayHaiku/../../Downloads -filelist /Users/joel/Library/Developer/Xcode/DerivedData/GayHaikuTabbed-aszefnihmscxaachdbimtmeozapo/Build/Intermediates/GayHaikuTabbed.build/Debug-iphonesimulator/GayHaikuTabbed.build/Objects-normal/i386/GayHaikuTabbed.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework Parse -framework Accounts -framework AdSupport -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework Foundation -framework Twitter -lsqlite3 -lz -lz.1.1.3 -framework MessageUI -framework MobileCoreServices -framework QuartzCore -framework Security -framework Social -framework StoreKit -framework SystemConfiguration -framework UIKit -o /Users/joel/Library/Developer/Xcode/DerivedData/GayHaikuTabbed-aszefnihmscxaachdbimtmeozapo/Build/Products/Debug-iphonesimulator/GayHaikuTabbed.app/GayHaikuTabbed

ld: warning: directory not found for option '-F/Users/joel/Development/GayHaiku/../../../Downloads'

编辑: 结果发现清理项目可以消除警告,但只有在我再次构建该项目之前,警告才会再次出现。我也尝试过删除派生数据,但没有任何效果。 :(

编辑: 好吧,库搜索路径和头搜索路径为空,但框架搜索路径设置中有几条路径。我想尝试删除它们,但我担心我会破坏其他东西,因为此时我已经超出了我真正知道任何事情的范围; 我只是按按钮并保持手指交叉。

2个回答

阿里云服务器只需要99元/年,新老用户同享,点击查看详情
3

好的,事实证明其中一个框架搜索路径出了问题。我不确定我删除了哪些路径,也不确定哪个路径造成了问题,但如果你遇到了这个问题,清除库和头文件搜索路径没有效果,可以尝试清除框架搜索路径。


那是几年前的一个很好的技巧 - 谢谢!省了我好几个小时。 - Fattie
你真的应该在那里“打勾”选中你自己的答案,JD。 - Fattie

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,