ld:未找到架构 i386 的符号 clang:错误:在为 Google App Invytes iOS 集成可可豆荚后

Posted

技术标签:

【中文标题】ld:未找到架构 i386 的符号 clang:错误:在为 Google App Invytes iOS 集成可可豆荚后【英文标题】:ld: symbol(s) not found for architecture i386 clang: error: after integrating cocoa pods for Google App Invytes iOS 【发布时间】:2015-07-27 15:32:49 【问题描述】:
Ld /Users/pallavi/Library/Developer/Xcode/DerivedData/Zingcy-flapxefzelxuhkdzrfjzikpzkylo/Build/Products/Debug-iphonesimulator/Zingcy.app/Zingcy normal i386
    cd "/Users/pallavi/Downloads/Zingcy 24 Cocoajuly 2015"
    export IPHONEOS_DEPLOYMENT_TARGET=7.1
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk -L/Users/pallavi/Library/Developer/Xcode/DerivedData/Zingcy-flapxefzelxuhkdzrfjzikpzkylo/Build/Products/Debug-iphonesimulator -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GGLInstanceID/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/Google/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GoogleAnalytics/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GoogleAppUtilities/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GoogleAuthUtilities/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GoogleCloudMessaging/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GoogleInterchangeUtilities/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GoogleNetworkingUtilities/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GoogleParsingUtilities/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GooglePlusUtilities/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GoogleSignIn/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GoogleSymbolUtilities/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GoogleUtilities/Libraries -L/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Zingcy/Utilities/Twitter+OAuth/Libraries -L& -LHeaders -F/Users/pallavi/Library/Developer/Xcode/DerivedData/Zingcy-flapxefzelxuhkdzrfjzikpzkylo/Build/Products/Debug-iphonesimulator -F/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/AppInvites/Frameworks -F/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GPPCore/Frameworks -F/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Pods/GoogleMobileAds/Frameworks -F/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Zingcy -F/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015/Zingcy/Utilities -F/Users/pallavi/Downloads/Zingcy\ 24\ Cocoajuly\ 2015 -filelist /Users/pallavi/Library/Developer/Xcode/DerivedData/Zingcy-flapxefzelxuhkdzrfjzikpzkylo/Build/Intermediates/Zingcy.build/Debug-iphonesimulator/Zingcy.build/Objects-normal/i386/Zingcy.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework CoreData -framework Accounts -framework Social -framework AVFoundation -framework CoreLocation -framework Foundation -framework UIKit -framework Security -framework TwitterKit -framework MediaPlayer -framework CoreText -framework CoreMotion -framework FacebookSDK -framework CoreGraphics -framework AssetsLibrary -framework AddressBook -framework GoogleOpenSource -framework QuartzCore -framework CoreFoundation -framework MobileCoreServices -framework GooglePlus -framework SystemConfiguration -lPods -Xlinker -dependency_info -Xlinker /Users/pallavi/Library/Developer/Xcode/DerivedData/Zingcy-flapxefzelxuhkdzrfjzikpzkylo/Build/Intermediates/Zingcy.build/Debug-iphonesimulator/Zingcy.build/Objects-normal/i386/Zingcy_dependency_info.dat -o /Users/pallavi/Library/Developer/Xcode/DerivedData/Zingcy-flapxefzelxuhkdzrfjzikpzkylo/Build/Products/Debug-iphonesimulator/Zingcy.app/Zingcy

ld: warning: directory not found for option '-L/Users/pallavi/Downloads/Zingcy 24 Cocoajuly 2015/Zingcy/Utilities/Twitter+OAuth/Libraries'
ld: warning: directory not found for option '-L&'
ld: warning: directory not found for option '-LHeaders'
ld: warning: ignoring file /Users/pallavi/Library/Developer/Xcode/DerivedData/Zingcy-flapxefzelxuhkdzrfjzikpzkylo/Build/Products/Debug-iphonesimulator/libPods.a, file was built for archive which is not the architecture being linked (i386): /Users/pallavi/Library/Developer/Xcode/DerivedData/Zingcy-flapxefzelxuhkdzrfjzikpzkylo/Build/Products/Debug-iphonesimulator/libPods.a

**Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_GIDSignIn", referenced from:
      objc-class-ref in FindPeopleViewController.o
  "_OBJC_CLASS_$_GINInvite", referenced from:
      objc-class-ref in FindPeopleViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)**

我已经完成了 Google App InVytes 的所有配置,但是一旦我编译 n 尝试运行我的项目,我就会遇到这些错误请建议提前谢谢

【问题讨论】:

在其他链接器标志中添加 $(inherited)。 ***.com/questions/31108868/… 转发 【参考方案1】:

尝试以下方法:-

包含 SafariServices 框架(转到目标->构建阶段->将二进制文件与库链接) 链接器标志 -ObjC(不是 -Objc)(转到目标->构建设置->其他链接器标志) 禁用 BIT_CODE(转到目标->构建设置->启用位码)

【讨论】:

【参考方案2】:

转到应用目标 -> 构建设置 -> 链接 -> 其他链接器标志,然后添加 $(inherited) 希望这对你有用。

【讨论】:

以上是关于ld:未找到架构 i386 的符号 clang:错误:在为 Google App Invytes iOS 集成可可豆荚后的主要内容,如果未能解决你的问题,请参考以下文章

gcc ld:未找到架构 i386 的符号

C ++ XCODE ld:未找到架构x86_64 clang的符号:错误:链接器命令失败,退出代码为1(使用-v查看调用)

未找到架构 armv7 颤振的符号

“架构 i386 的未定义符号”问题

在 iOS 中使用静态库的“架构 i386 的未定义符号”

xcode 6 - 未找到架构 i386 (zbar) 的符号