libtool 在 XCode 4.3 上失败,退出代码为 1

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9511741/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 23:29:24  来源:igfitidea点击:

libtool failed with exit code 1 on XCode 4.3

objective-cxcodexcode4.3

提问by Doz

I have XCode 4.3 and I am getting this frustrating xml-lib related error. I have a feeling its because of the fact that 4.3 is not using /Developer folder but instead the /Applications/XCode.app/... The error message is below:

我有 XCode 4.3 并且遇到了这个令人沮丧的 xml-lib 相关错误。我有一种感觉,因为 4.3 没有使用 /Developer 文件夹,而是使用 /Applications/XCode.app/... 错误消息如下:

Libtool /Users/dkatz/Library/Developer/Xcode/DerivedData/RWEngines-ewchevfhokeivnffrputdqapsyxu/Build/Products/Release-iphonesimulator/RWEngines.framework/Versions/A/RWEngines normal i386
cd /Users/dkatz/Sites/xCode/RWA/RWEngines
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only i386 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/dkatz/Library/Developer/Xcode/DerivedData/RWEngines-ewchevfhokeivnffrputdqapsyxu/Build/Products/Release-iphonesimulator -filelist /Users/dkatz/Library/Developer/Xcode/DerivedData/RWEngines-ewchevfhokeivnffrputdqapsyxu/Build/Intermediates/RWEngines.build/Release-iphonesimulator/RWEngines.build/Objects-normal/i386/RWEngines.LinkFileList -ObjC -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework UIKit /Users/dkatz/Library/Developer/Xcode/DerivedData/RWEngines-ewchevfhokeivnffrputdqapsyxu/Build/Products/Release-iphonesimulator/libCorePlot-CocoaTouch.a -framework SenTestingKit -framework QuartzCore -framework Foundation -framework RWCommon -o /Users/dkatz/Library/Developer/Xcode/DerivedData/RWEngines-ewchevfhokeivnffrputdqapsyxu/Build/Products/Release-iphonesimulator/RWEngines.framework/Versions/A/RWEngines

And the actual error:

和实际错误:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool 失败,退出代码为 1

Thanks guys!

谢谢你们!

回答by atulkhatri

I was having this problem. I was following this tutorial for embedding webview in phonegap application- http://docs.phonegap.com/en/2.2.0/guide_cordova-webview_ios.md.html#Embedding%20Cordova%20WebView%20on%20iOS

我遇到了这个问题。我正在按照本教程在 phonegap 应用程序中嵌入 webview - http://docs.phonegap.com/en/2.2.0/guide_cordova-webview_ios.md.html#Embedding%20Cordova%20WebView%20on%20iOS

i added'-Obj-C' in 'other linker flags' as said in point 12. I just changed -Obj-C to -ObjC and it worked !!

如第 12 点所述,我在“其他链接器标志”中添加了“-Obj-C”。我只是将 -Obj-C 更改为 -ObjC 并且它起作用了!

回答by Vineel Shah

I don't know if this will help you, but I got rid of that error by removing the "-licucore" linker flag that was set in the "Other Linker flags" build setting. This seems to be the regex library for Mac OSX.

我不知道这是否会对您有所帮助,但我通过删除在“其他链接器标志”构建设置中设置的“-licucore”链接器标志来消除该错误。这似乎是 Mac OSX 的正则表达式库。

回答by mike

I had this same issue when I was attempting to Archive for ad-hoc testing and discovered that it was complaining because I had a space character in my scheme name. To fix this I went to Manage Schemes and removed spaces from the name.

当我尝试存档以进行临时测试时遇到了同样的问题,并发现它在抱怨,因为我的方案名称中有一个空格字符。为了解决这个问题,我转到了管理方案并从名称中删除了空格。

My specific error was

我的具体错误是

clang: error: '-I-' not supported, please use -iquote instead

clang: error: '-I-' not supported, please use -iquote instead

回答by RelativeGames

I got this error when switching from Xcode 4.6 Developer Preview 1 to Xcode 4.6 Developer Preview 2

从 Xcode 4.6 Developer Preview 1 切换到 Xcode 4.6 Developer Preview 2 时出现此错误

and the fix is to re-add all the frameworks to your projects !

解决方法是将所有框架重新添加到您的项目中!

All frameworks (iAd, QuartzCore, GameKit,StoreKit,etc) were still pointing to the Xcode path from DP1. I just needed to rebind them to DP2. Additionally when adding frameworks select "Relative to SDK"rather than "Absolute Path" as some frameworks (10% of them) were still pointing to the right path.

所有框架(iAd、QuartzCore、GameKit、StoreKit 等)仍然指向 DP1 的 Xcode 路径。我只需要将它们重新绑定到 DP2。此外,在添加框架时选择“相对于 SDK”而不是“绝对路径”,因为某些框架(其中 10%)仍然指向正确的路径。

回答by Karthik

This might help.

这可能会有所帮助。

In project build settings try removing the build settings for "Other Interface Builder Compiler Flags" (if -Wmost is set, set it to nil).

在项目构建设置中,尝试删除“Other Interface Builder Compiler Flags”的构建设置(如果设置了 -Wmost,请将其设置为 nil)。

Project --> Build settings ---> Other Interface Builder Compiler Flags --> set to none(empty).

项目 --> 构建设置 ---> 其他接口生成器编译器标志 --> 设置为无(空)。