目录未找到Apple Mach-O链接器警告但库搜索路径和框架搜索路径为空 [英] directory not found Apple Mach-O linker warning but Library Search Path and Framework Search Path are empty

查看:85
本文介绍了目录未找到Apple Mach-O链接器警告但库搜索路径和框架搜索路径为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下消息:

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

但是当我进入Build Settings时(按照'ld:警告:找不到选项的目录',库搜索路径和框架搜索路径为空,因此无需删除任何内容。

But when I go to Build Settings (as suggested at ‘ld: warning: directory not found for option’), Library Search Path and Framework Search Path are empty, so there's nothing to delete.

关于我可以做些什么来摆脱这个警告的想法?

Thoughts on other things I can do to get rid of this warning?

推荐答案

以下是基于 Apple Dev Forum 发布的如何避免问题的说明之前。它对我有用,所以我对那些不想去论坛注册的人重新发布描述。

Here is a description how to avoid a problem based on Apple Dev Forum posted before. It works for me so I repost description for those people who don't want to go and register at the forum.

该错误是由于XCode 5中的错误造成的它处理用户向项目中添加新文件或文件夹。

The bug is due to an error in XCode 5 when it deals with the user adding new files or folders to the project.

Xcode正在修改图书馆搜索路径构建设置,并制作了一个糟糕的混乱。
而不是添加$(SRCROOT)/它正在为所有新项添加完全有根的路径,并将随机数量的///添加到字符串的其他元素中。
在某些情况下,它似乎也是复制源路径,可能是因为它破坏了现有路径,并认为它们需要再次添加。

Xcode is modifying the 'Library Search Paths' build setting, and making a god-awful mess of it. Instead of adding $(SRCROOT)/ it is adding fully rooted paths to all new items, and adding random amounts of /// into other elements of the string. It also seems to be duplicating source paths in some instances, probably because it's broken the existing ones, and thinks they need adding again.

解决方案:


  1. 将库搜索路径字符串复制到文本编辑器中。

  2. 删除所有完全生根的路径不应该在那里,并用通常的$(SRCROOT)/ MyFiles /类型路径替换它们。

  3. 删除所有无关的斜杠并确保每个路径在开头和结尾都有一个字符防止文件名中的空格。

  4. 将编辑后的字符串粘贴回构建设置。

  5. 清理,然后构建。应该恢复正常。

  1. Copy out your Library Search Paths string into a text editor.
  2. Remove any fully rooted paths that shouldn't be there, and replace them with the usual $(SRCROOT)/MyFiles/ type paths.
  3. Remove all extraneous slashes and make sure each path has a " character at beginning and end to protect against spaces in filenames.
  4. Paste the edited string back into Build Settings.
  5. Clean, then Build. Should be back to normal.

如果您向项目中添加新文件,可能会再次出现此错误,请注意。

This error may well recur if you add new files to your project, so beware.

这篇关于目录未找到Apple Mach-O链接器警告但库搜索路径和框架搜索路径为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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