xcode ld:警告:找不到选项的目录-删除派生数据和清理项目不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14912162/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 02:47:03  来源:igfitidea点击:

ld: warning: directory not found for option -- deleting derived data and cleaning project don't work

iosxcodewarnings

提问by Joel Derfner

I moved the entire folder for the app I'm working on in Xcode from one place to another on my computer and got the warning ld: warning: directory not found for optionfollowed by a long path.

我将我正在 Xcode 中处理的应用程序的整个文件夹从一个地方移动到我计算机上的另一个地方,然后收到警告,ld: warning: directory not found for option然后是一条很长的路径。

I followed the accepted answer at Apple Mach-O Linker errors and I don't know what to dobut still got the same warning.

我在Apple Mach-O Linker 错误中遵循了公认的答案,但我不知道该怎么做,但仍然收到相同的警告。

EDIT:Here's the message I get, in case it's relevant:

编辑:这是我收到的消息,以防万一:

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'

EDIT:Turns out that cleaning the project removes the warning--but only until I build it again, and then the warning appears again. I've also tried deleting the derived data, but nothing doing. :(

编辑:事实证明,清理项目会删除警告——但直到我再次构建它,然后警告再次出现。我也试过删除派生数据,但什么也没做。:(

EDIT:Well, the library search paths and header search paths are empty, but there are several paths in the framework search paths settings. I want to try deleting them, but I'm worried I'll wreck something else, since at this point I'm beyond where I really know what anything actually means; I'm just pressing buttons and keeping my fingers crossed.

编辑:嗯,库搜索路径和标题搜索路径是空的,但框架搜索路径设置中有几个路径。我想尝试删除它们,但我担心我会破坏其他东西,因为在这一点上我已经超出了我真正知道什么真正意味着什么的地步;我只是按下按钮并保持手指交叉。

采纳答案by Joel Derfner

Well, it did turn out to be one of the Framework Search Paths. I'm not sure which ones I deleted, and I'm not sure which one was responsible, but if you're having this issue and clearing the Library and Header Search Paths haven't worked, try the Framework.

嗯,结果证明它是框架搜索路径之一。我不确定我删除了哪些,也不确定是哪个负责,但是如果您遇到此问题并且清除库和标题搜索路径不起作用,请尝试使用 Framework。

回答by Saliom

you should take a look at this question ‘ld: warning: directory not found for option'it might be what you're looking for :)

你应该看看这个问题'ld: warning: directory not found for option'这可能就是你要找的:)