简体   繁体   English

具有i386 x86_64 armv7 armv7s arm64的通用IOS静态库

[英]universal IOS static library with i386 x86_64 armv7 armv7s arm64

I need to create an universal library of a Cocoa Touch Static library project, 我需要创建一个Cocoa Touch Static库项目的通用库,

I am using 我在用

xcodebuild -target mysdsk ONLY_ACTIVE_ARCH=NO VALID_ARCHS="arm64 armv7 armv7s i386 x86_64" -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"

Even if I split the iphonesimulator as two xcodebuild still I could not get i386 for iphone4 simuator 即使我将iphonesimulator拆分为两个xcodebuild,也无法将i386用于iphone4模拟器

I am getting error 我遇到错误

Undefined symbols for architecture i386

Based on How do I determine the target architecture of static library (.a) on Mac OS X? 基于如何确定Mac OS X上静态库(.a)的目标体系结构?

I tried to run the file command, it displays 我试图运行file命令,它显示

mysdsk.a: Mach-O universal binary with 5 architectures
mysdsk.a (for architecture i386): current ar archive random library
mysdsk.a (for architecture armv7): current ar archive random library
mysdsk.a (for architecture armv7s): current ar archive random library
mysdsk.a (for architecture x86_64): current ar archive random library
mysdsk.a (for architecture arm64): current ar archive random library

But still I am getting error 但是我仍然出错

Undefined symbols for architecture i386

Whatever method you have followed, From the list of architectures I think everything is fine. 无论采用哪种方法,从体系结构列表中,我都认为一切都很好。

There is one issue with XCode that even if you drag an drop the mysdsk.a or change inside the linker setttings, The XCode can still pick a wrong file which is stored inside XCode有一个问题,即使您拖放mysdsk.a或更改链接器设置内部,XCode仍然可以选择一个错误的文件,该文件存储在内部

/Users/<your username>/Library/Developer/Xcode/DerivedData/mysdsk_........ folder

You can identify from XCode warnings saying 3 slices but it is actually 5 slices 您可以从XCode警告中识别出3片,但实际上是5片

ld: warning: ignoring file /Users//Library/Developer/Xcode/DerivedData/mysdsk_......./..../mysdsk.a, missing required architecture i386 in file /Users//Library/Developer/Xcode/DerivedData/mysdsk_......./..../mysdsk.a (3 slices) ld:警告:忽略文件/Users//Library/Developer/Xcode/DerivedData/mysdsk_......./..../mysdsk.a,文件/ Users // Library / Developer /中缺少必需的体系结构i386 Xcode / DerivedData / mysdsk _....... / .... / mysdsk.a(3片)

Therefore Delete the folder /Users//Library/Developer/Xcode/DerivedData/mysdsk_........ 因此,删除文件夹/ Users // Library / Developer / Xcode / DerivedData / mysdsk_........。

Then it should be working fine, Actually I identified this issue that the other machine works fine but my machine was not working. 然后,它应该可以正常工作。实际上,我发现此问题是另一台计算机可以正常工作,但是我的计算机无法正常工作。

Reference ignoring file [path] missing required architecture i386 in file 引用忽略文件[path]文件中缺少必需的体系结构i386

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

相关问题 为armv7,armv7s,arm64,i386和通用构建ffmpeg iOS库 - Building ffmpeg iOS libraries for armv7, armv7s, arm64, i386 and universal 检查依赖项...没有要编译的体系结构(ARCHS = i386,VALID_ARCHS = arm64 armv7s armv7) - Check dependencies… No architectures to compile for (ARCHS=i386, VALID_ARCHS=arm64 armv7s armv7) 没有要编译的架构(ARCHS = i386,VALID_ARCHS = arm64 armv7 armv7s) - No architectures to compile for (ARCHS=i386, VALID_ARCHS=arm64 armv7 armv7s) Worklight 6.0.0.1 iOS Native Library仅适用于ARMv7而不适用于ARMv7和ARM64? - Worklight 6.0.0.1 iOS Native Library only for ARMv7 and not for ARMv7s and ARM64? 在Armv7,Arv7和arm64中使用Linphone - Use Linphone in Armv7s, Armv7 and arm64 arm64 armv7 armv7s架构设置 - arm64 armv7 armv7s Architectures settings 在Mac 10.8上安装ffmpeg ios库armv7,armv7s,i386和Universal - Installing ffmpeg ios libraries armv7, armv7s, i386 and universal on Mac with 10.8 适用于iOS的leptonica 1.69交叉编译(armv7,armv7s和arm64) - leptonica 1.69 crosscompile for iOS (armv7, armv7s and arm64) 适用于armv7,armv7s和arm64的iOS开源构建 - iOS open source build for armv7 , armv7s ,arm64 armv7,armv7s和arm64的ipa存档版本无法安装到iOS 5.1.1设备 - ipa archive build for armv7, armv7s and arm64 cannot be installed to iOS 5.1.1 devices
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM