简体   繁体   English

iPhone中的Zebra打印机代码

[英]Zebra printer code in iphone

Thanks for going through this. 感谢您完成此操作。 I successfully integrated Zebra Printer working in xcode and got the label printer successfully from simulator, but the problem raises the moment i tried to debug it on my device saying "ld: warning: ignoring file /Users/MYSystem/Desktop/MYProject/libZSDK_API.a, file was built for archive which is not the architecture being linked (armv7) Undefined symbols for architecture armv7: "_OBJC_CLASS_$_ZebraPrinterFactory", referenced from: objc-class-ref in MyViewController.o "_OBJC_CLASS_$_TcpPrinterConnection", referenced from: objc-class-ref in MyViewController.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)". 我成功地集成了在xcode中工作的Zebra打印机,并成功地从模拟器获得了标签打印机,但是问题引起了我尝试在设备上调试它的瞬间,即“ ld:警告:忽略文件/ Users / MYSystem / Desktop / MYProject / libZSDK_API。一个文件是为要归档的文件而不是要链接的体系结构而构建的(armv7)体系结构armv7的未定义符号:“ _ OBJC_CLASS _ $ _ ZebraPrinterFactory”,引用自:MyViewController.o中的objc-class-ref。 MyViewController.o中的objc-class-ref ld:未为架构armv7叮当声找到符号:错误:链接器命令失败,退出代码为1(使用-v查看调用)”。

What would went wrong, please help me out from this..Thanks in advance 出了什么问题,请帮助我。

The problem is the library is built for ios simulator which is using mac osx architecture which is i386 but ios device is based on ARM v6/v7 architecture that's why you are getting this error. 问题是该库是为使用i386的mac osx架构的ios模拟器构建的,但是ios设备基于ARM v6 / v7架构,这就是您收到此错误的原因。 Try to compile library for ios device. 尝试为ios设备编译库。

You need to include the library for the device, not the simulator. 您需要包括设备的库,而不是模拟器。 If you look at your install folder the lib folder has a Device and a Simulator directory. 如果查看安装文件夹,则lib文件夹具有DeviceSimulator目录。 Link against the library in the Device directory. 链接到Device目录中的库。

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

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