找不到Xlinker文件的链接失败错误 [英] Linking failing with Xlinker file not found error
问题描述
我试图用Xcode 4编译一个Xcode项目,这是一个Xcode 3.2项目.
I am trying to compile a Xcode project which was a Xcode 3.2 project with Xcode 4. I am getting the following error.
ld:找不到文件:-Xlinker collect2:ld返回1退出状态命令/开发人员/平台/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2失败,退出代码为1
ld: file not found: -Xlinker collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
无法解决问题.
这仅在我使用Gcc4.2编译器时发生.当我使用LLVM时,效果很好.
And this happens only when I use the Gcc4.2 compiler. When I use LLVM it works fine.
推荐答案
根据 http://www.cocoadev.com/index.pl?ApplicationLinkingIssues ,您可能拥有对不再存在的旧位置的框架引用.检查MyProject.xcodeproj/目标/构建阶段/库中的链接二进制文件中的库列表,也许必须将其删除并再次添加.进行产品/清洁操作,因为XCode经常无法在构建设置中实现更改.
According to http://www.cocoadev.com/index.pl?ApplicationLinkingIssues you might have framework references to old locations that do not exist anymore. Check the library list in MyProject.xcodeproj / Targets / Build Phases / Link Binary with Libraries, maybe they have to be removed and added again. Do a Product / Clean because XCode often does not realise changes in the build settings.
这篇关于找不到Xlinker文件的链接失败错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!