xcode4 zxing:架构 i386 的未定义符号

发布于 2024-12-27 13:35:23 字数 483 浏览 5 评论 0原文

我需要将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

看透却不说透 2025-01-03 13:35:23

仔细检查自述文件中的第 2 步。在Link Binary with Libraries下,您必须有libZXingWidget.a,但听起来您没有。

Double check step 2 in the README. Under Link Binary with Libraries you must have libZXingWidget.a and it sounds like you don't.

笑叹一世浮沉 2025-01-03 13:35:23

检查构建设置中的有效架构。查看这些链接。

体系结构 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..

雨巷深深 2025-01-03 13:35:23

我遇到了同样的问题,“构建设置”中的以下配置对我有用。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文