尝试在数据解析器类中创建和初始化对象时出现以下编译错误。该代码是
Component *component=[[Component alloc] initWithInputComObjects:inputComObjects withOutputComObjects:outputComObjects];
其中
initWithInputComObjects:inputComObjects:withOutputComObjects:outputComObjects
是库中.m文件内部的方法ld: warning: directory not found for option '-L/Users/admin/Desktop/KNXComfort/Pods/build/Debug-iphoneos' ld: warning: ignoring file /Users/admin/Desktop/KNXComfort/KNXComfort/libKNXCommuncationLib.a, missing required architecture i386 in file /Users/admin/Desktop/KNXComfort/KNXComfort/libKNXCommuncationLib.a (3 slices) Undefined symbols for architecture i386: "_OBJC_CLASS_$_Channel", referenced from: objc-class-ref in DataParser.o "_OBJC_CLASS_$_ComObject", referenced from: objc-class-ref in DataParser.o "_OBJC_CLASS_$_Component", referenced from: objc-class-ref in DataParser.o "_OBJC_CLASS_$_Device", referenced from: objc-class-ref in DataParser.o (maybe you meant: _OBJC_CLASS_$_DevicesCollectionViewController, _OBJC_CLASS_$_DevicesCollectionViewCell ) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
最佳答案
Undefined symbols for architecture i386
您正在尝试为i386处理器进行构建,但是您尝试使用的库并未为支持该体系结构而构建。
您或者需要从构建中删除i386(为设备构建),或者重建该库以包括对i386的支持。
关于ios - 从静态库初始化对象时,在构建过程中发生编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24649484/