简体   繁体   English

Xcode 6中的Shell脚本调用错误

[英]Shell Script Invocation Error in Xcode 6

I used to compile universal static library with iOS-Universal-Framework, and works fine until I upgrade Xcdoe to 6. 我曾经用iOS-Universal-Framework编译通用静态库,并且工作正常,直到我将Xcdoe升级到6。

I got the following error 我收到以下错误

** BUILD SUCCEEDED **

Create universal static library /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool -static /Users/taofang/Library/Developer/Xcode/DerivedData/xxxxx/Build/Products/Debug-iphoneos/xxx.framework/xxx /Users/taofang/Library/Developer/Xcode/DerivedData/xxxxx/Build/Products/Debug-iphonesimulator/xxx.framework/xxx -o /Users/taofang/Library/Developer/Xcode/DerivedData/xxxxx/Build/Products/Debug-iphoneos/xxx.framework/xxx.temp error: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool: can't open file: /Users/taofang/Library/Developer/Xcode/DerivedData/xxxxx/Build/Products/Debug-iphonesimulator/xxx.framework/xxx (No such file or directory) 创建通用静态库/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool -static / Users / taofang / Library / Developer / Xcode / DerivedData / xxxxx / Build / Products / Debug -iphoneos / xxx.framework / xxx /Users/taofang/Library/Developer/Xcode/DerivedData/xxxxx/Build/Products/Debug-iphonesimulator/xxx.framework/xxx -o / Users / taofang / Library / Developer / Xcode / DerivedData /xxxxx/Build/Products/Debug-iphoneos/xxx.framework/xxx.temp错误:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool:无法打开文件:/Users/taofang/Library/Developer/Xcode/DerivedData/xxxxx/Build/Products/Debug-iphonesimulator/xxx.framework/xxx(没有这样的文件或目录)

If i use Xcode 5 to do the job, it will be fine. 如果我使用Xcode 5来完成这项工作,那就没问题。

Beside, I selected Device as my compile target, but why the libtool tries to open a file under iphonesimulator folder? 在旁边,我选择Device作为我的编译目标,但为什么libtool试图在iphonesimulator文件夹下打开一个文件?

That means there are no header files in any of your build folders. 这意味着您的任何构建文件夹中都没有头文件。 It may be because you haven't configured your library project to export any header files. 可能是因为您尚未将库项目配置为导出任何头文件。

Go to your Project Target >> Build Phases >> + sign >> Add a new build phase 转到项目目标>>构建阶段>> +符号>>添加新的构建阶段

You need to add a Copy files Phase that copies the headers you want to the include folder. 您需要添加复制文件阶段,将所需的标头复制到包含文件夹。

而不是chmod a+x [PATH] ,我可以使用chmod 777 [PATH]解决它。

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

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