xcode4 zxing:架构 i386 的未定义符号
我需要将 QR 合并到我的应用程序中,我使用 zxing,
扫描测试效果非常好,并且在遵循所有说明后导入小部件时,一切顺利, 但
在实现小部件和 QRCodeReader 的代码时出现此错误
架构 i386 的未定义符号: “_OBJC_CLASS_$_ZXingWidgetController”,引用自: attendanceVC.o 中的 objc-class-ref “_OBJC_CLASS_$_QRCodeReader”,引用自: attendanceVC.o 中的 objc-class-ref ld:未找到架构 i386 的符号 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
那么如何解决这个问题?
编辑: 我的构建设置架构是:i386 armv6 armv7
非常感谢!
I need to incorporate QR in my app, im using zxing,
the scan test works wonderfully, and when importing the widget after following all instructions, all goes fine,
but
I have this errors when implementing the code for the widget and QRCodeReader
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ZXingWidgetController", referenced from:
objc-class-ref in AttendanceVC.o
"_OBJC_CLASS_$_QRCodeReader", referenced from:
objc-class-ref in AttendanceVC.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
so how to fix this please?
edit:
my Architectures on build settings is: i386 armv6 armv7
thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
仔细检查自述文件中的第 2 步。在
Link Binary with Libraries
下,您必须有libZXingWidget.a
,但听起来您没有。Double check step 2 in the README. Under
Link Binary with Libraries
you must havelibZXingWidget.a
and it sounds like you don't.检查构建设置中的有效架构。查看这些链接。
体系结构 i386 的未定义符号:_OBJC_CLASS_$_SKPSMTPMessage”,引用自:错误
架构 i386 的未定义符号
编辑: 通常这些类型的链接器错误由于编译器中的链接问题或添加的框架或库的链接问题而发生。检查您是否使用了合适的编译器,检查您是否已添加所有必需的库和框架。还要检查您是否已导入所有内容。请正确检查所有这些内容,请检查以下链接
http://forums.macrumors.com/showthread.php?t=956090
为设备编译时出现 Apple Mach-O 链接器错误
链接器错误(仅模拟器)更新到 iPhone SDK 4.0 后使用自己的库
clang:错误:链接器命令失败,退出代码 1
希望这有帮助..
Check the Valid Architectures in the build settings. Check out these links.
Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error
Undefined symbols for architecture i386
EDIT : Usually these type of linker errors occur due to the link issue in your compiler or link issue with your added frameworks or your libraries. check whether you are using a suitable compiler, check whether you have added all the required libraries and frameworks. Also check whether you have imported all the libraries and frameworks properly. Please check all these things too once. For guidance on this check the below links
http://forums.macrumors.com/showthread.php?t=956090
Apple Mach-O Linker Error when compiling for device
Linker error (only simulator) with own library after update to iPhone SDK 4.0
clang: error: linker command failed with exit code 1
Hope This Helps..
我遇到了同样的问题,“构建设置”中的以下配置对我有用。
C 语言方言:GNU99 [-std=gnu99]
C++ 语言方言:编译器默认
C++ 标准库:编译器默认值
I had the same issue and following configuration in "Build Settings" works for me.
C Language Dialect: GNU99 [-std=gnu99]
C++ Language Dialect: Compiler Default
C++ Standard Library: Compiler Default