2015-02-10 92 views
0

我最近從Git倉庫下載了一些源代碼到Xcode 6.1.1。但是,對於包含應用程序(並存在於我的文件系統中)的庫,我正在「缺少必需的架構i386」。 這裏的錯誤:如何解決未定義的符號體系結構i386

ld: warning: ignoring file /Users/myname/Documents/mycomp-mycompapp-ios/mycomp/libs/zbar_iOS7_Fix/libzbar.a, missing required architecture i386 in file /Users/myname/Documents/mycomp-mycompapp-ios/mycomp/libs/zbar_iOS7_Fix/libzbar.a (3 slices) 
Undefined symbols for architecture i386: 
    "_OBJC_CLASS_$_ZBarReaderView", referenced from: 
     objc-class-ref in MyViewController.o 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

我已經通過一些類似的帖子了,但我有麻煩的工作出了什麼解決方案 - 是它建立的設置有關,我導入其他庫?

回答

1

看起來Xcode並未在「構建階段」中鏈接您的庫。這些是爲了解決它做的步驟:

TargetSettings - >構建階段 - >編譯源代碼 - >添加ZBarReaderView.m類(和其他人如果需要的話) - >生成和運行

+0

感謝 - 但我仍然收到相同的錯誤消息。 – 2015-02-10 19:30:50

+0

重建之前清理過嗎? – tbaranes 2015-02-10 19:31:11

+0

問題似乎是.h文件包含在代碼中,但.m文件不包含在內。 – 2015-02-10 19:43:42

相關問題