找不到选项的 Xcode 链接器目录 [英] Xcode linker Directory not found for option

查看:24
本文介绍了找不到选项的 Xcode 链接器目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xcode 4 向我发出警告,提示找不到选项-L/Users/t2wu/Documents/blah blah"的目录.是的,它不应该被找到,因为我删除了它.我删除了目录,还删除了目标和项目库搜索路径中的目录设置.我还从链接二进制文件与库"中删除了我之前链接的 .a 文件.它编译得很好,它只是给了我警告.为什么它仍然有 -L 标志?

Xcode 4 is throwing me a warning about directory not found for option '-L/Users/t2wu/Documents/blah blah'. Yes it shouldn't be found because I removed it. I remove the directory and I also removed the directory setting in both the target and the project library search path. I also remove the .a file which I was linking before from the "Link binaries with Libraries". It compiles fine, it just gives me the warning. Why is it still having the -L flag?

推荐答案

检查构建设置选项卡并确保库搜索路径"选项为空.

Check the Build settings tab and make sure that the "Library search paths" option is empty.

最后,启动终端并 cd 到应用程序项目目录 (appname.xcodeproj) 并为错误的搜索路径执行 fgrep.我发现其中一些潜伏在 project.pbxproj 文件中;最终手动编辑文件以摆脱它们.(当然,您应该在执行此操作之前制作该文件的副本,以防您将项目文件丢弃.)

At last resort, fire up Terminal and cd to the app project directory (appname.xcodeproj) and do a fgrep for the erroneous search path. I've found some of these lurking in the project.pbxproj file; ended up editing the file manually to get rid of them. (Of course you should make a copy of the file before doing so, in case you trash the project file.)

对项目进行清理"也是值得的.如何清空缓存和清理所有目标 Xcode 4.

It'd also be worthwhile to do a "clean" on the project. How to Empty Caches and Clean All Targets Xcode 4.

这篇关于找不到选项的 Xcode 链接器目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆