X $ C $ 4:链接错误:目录找不到选项 [英] xcode4: Linker error: Directory not found for option

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

问题描述

我得到这个错误我的个人资料版本(调试版本是确定的)。

I'm getting this error for my profile build (debug build was OK).

{Directory not found for option '-L../../../Mac/Profile/lib [full path of that directory]

Library not found for -lMyLib}

当我检查路径,目录存在和库文件libmylib.a添加同样存在。
我的个人资料构建库搜索路径包括目录$(SRCROOT)/../../../的Mac /资料/ lib目录下。我还相信,该库是根据配置文件设置建造的。

When I check the path, the directory exists and the lib file libMyLib.a exists as well. My library search path for the Profile build includes that directory $(SRCROOT)/../../../Mac/Profile/lib. I also made sure that the library was built under profile setting.

这仅轮廓构建情况。

我真的很想有一些帮助尽管它可能是一个没有脑子的问题。

I'd really love to have some help although it may well be a no-brainer question.

感谢您!

编辑:找到自己的解决方案
解决了这个问题:在我的链接路径,有两个目录条目。第二个是由双引号包围,而第一个不是。 X code4似乎它们连接成一个单一的目录项,显然这是垃圾。我删除了引号之后,链接器错误就消失了。

Found the solution myself Solved the problem: In my linker path, there were two directory entries. The second one was surrounded by double quotes while the first one wasn't. Xcode4 seems to have concatenated them into a single directory entry and apparently that was garbage. After I removed the quotation marks, the linker error was gone.

推荐答案

进入获取信息的目标。点击生成设置选项卡(我使用X code4),向下滚动到搜索路径,在这里您可以在库搜索路径中删除所有的值。

Go to "Get Info" on the target. Click the "Build Settings" tab (i'm using Xcode4), and scroll down to "Search Paths", Where You delete all the values in "Library Search Paths".

希望帮助...

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

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