gpt4 book ai didi

architecture - 错误信息 : Undefined symbols for architecture i386 using ZBar Libraries

转载 作者:行者123 更新时间:2023-12-04 10:21:11 28 4
gpt4 key购买 nike

我现在正在尝试在 Xcode 4.0 中构建的项目遇到问题,希望有人可以为我解释一下。

我正在尝试使用 ZBar SDK 并遵循此处概述的指南中概述的说明:

http://zbar.sourceforge.net/iphone/sdkdoc/camera.html

但是,我遇到了同样的错误。我查看了 John 的帖子,但是,他提到的路径不在我的 LIBRARY_SEARCH_PATH 中。

我正在使用 Xcode 4.0,并且正在尝试为 iPad 4.3 模拟器构建我的项目。

(我得到的错误):

Undefined symbols for architecture i386:
"_objc_msgSend", referenced from:
_main in main.o
-[PrototypeAppDelegate application:didFinishLaunchingWithOptions:] in PrototypeAppDelegate.o
-[PrototypeAppDelegate dealloc] in PrototypeAppDelegate.o
-[Home loadGRView] in Home.o
...
"_UIApplicationMain", referenced from:
_main in main.o
"_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
objc-class-ref in main.o
"_objc_msgSendSuper2", referenced from:
-[PrototypeAppDelegate dealloc] in PrototypeAppDelegate.o
-[PrototypeAppDelegate_iPhone dealloc] in PrototypeAppDelegate_iPhone.o
...
"_objc_setProperty", referenced from:
-[PrototypeAppDelegate setTabBarController:] in PrototypeAppDelegate.o
-[PrototypeAppDelegate setTheNavController:] in PrototypeAppDelegate.o
...

等等。

我曾尝试查看 ZBar sdk 中包含的 ReaderSample 代码,并认为问题在于我缺少他们在应用程序中使用的几个框架,但包含这些框架只会增加我遇到的错误数量。这是build设置问题吗?有没有人知道我可以尝试做什么?

P.S:我找到了两个类似这个问题的线程,尝试了他们推荐的各种解决方案,仍然无法得到解决方案

-http://stackoverflow.com/questions/1452466/suddenly-i-am-not-able-to-build-for-the-iphone-simulator
-http://stackoverflow.com/questions/1456185/build-error-missing-required-architecture-i386-in-file/1467238#1467238

我希望我正确使用这个线程......我对堆栈溢出比较陌生。吨

最佳答案

我能够四处玩耍并让它发挥作用。

我将 Xcode 更新到 4.0.2。此外,ZBar 的文档忘记提及使用 SDK 所需的其他框架(查看 ReaderSample 应用程序)。这7个框架需要按以下顺序排列:

Foundation.framework
CoreGraphics.framework
UIKit.framework
AVFoundation.framework
CoreMedia.framework
CoreVideo.framework
QuartzCore.framework
libiconv.dylib
libzbar.a

我不知道框架在构建阶段中声明的顺序很重要。无论如何,希望对于任何试图将条码扫描器集成到他们的应用程序中的人来说,这个答案会很有用。

关于architecture - 错误信息 : Undefined symbols for architecture i386 using ZBar Libraries,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5980587/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com