简体   繁体   English

Xcode找不到那里的路径

[英]Xcode can't find paths that are there

I have an xcode project that was created on another mac. 我有一个在另一个Mac上创建的xcode项目。 That make was PROBABLY osx 10.5 using Xcode 3. (When I went to install xcode I could only get Xcode 4 AND was required to upgrade my mac to 10.6) anyway, I am experiencing problems compiling this project that compiles fine on the other computer. 那就是使用Xcode 3的PROBABLY osx 10.5。(当我去安装xcode时,我只能得到Xcode 4,并且需要将我的mac升级到10.6),我在编译这个在另一台计算机上可以正常编译的项目时遇到了问题。

I don't know why. 我不知道为什么 The build always fails and I see it is looking for a path incorrectly. 构建总是失败,我看到它在错误地寻找路径。

The physical directory layout is like this 物理目录布局是这样的

/path/devfolder/devfolderMainProject/mainproject.xcodeproj
/path/devfolder/helpinglibrary/helpinglibrary.xcodeproj
/path/devfolder/anotherlibrary/anotherlibrariesFiles/...

But when Xcode starts doing the stuff for the helping library, it returns linker errors and I can see it is looking for files in the wrong places 但是当Xcode开始为帮助库做事时,它返回链接器错误,我可以看到它正在错误的位置寻找文件。

linker error  /path/devfolder/helpinglibrary/../../anotherlibrary/anotherlibrariesFiles/src/correctfile.cpp  does not exist

so I browse and see that the file definitely does exist, and that Xcode is looking too many directory up 所以我浏览发现该文件确实存在,并且Xcode查找了太多目录

../../ ../../

should just be 应该只是

../ ../

so that it only goes 1 directory up, how do I make it look in the right place? 这样它就只能进入1个目录,如何使它在正确的位置显示?

Moving the folders around in finder breaks plenty of OTHER things, so I am not sure what to do here. 在finder中移动文件夹会破坏很多其他事情,因此我不确定在这里做什么。

I suggest you to open the target properties. 我建议您打开目标属性。 In the "Build" tab, look for the settings OTHER_LDFLAGS and LIBRARY_SEARCH_PATH . 在“构建”标签中,查找设置OTHER_LDFLAGSLIBRARY_SEARCH_PATH I have a project with a structure just identical to your one and I have edited these properties to inform the Xcode where to look for my libraries. 我有一个项目,其结构与您的项目完全相同,并且我已经编辑了这些属性,以告知Xcode在哪里查找我的库。 Maybe you can have some wrong value in some of these settings. 在某些设置中,您可能会有一些错误的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM