xcode 错误是什么意思?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17229005/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:31:47  来源:igfitidea点击:

What does the error mean?

iphoneiosxcodeipadadmob

提问by Michaelson Samuel

Ld /Users/michaelsonsamuels/Library/Developer/Xcode/DerivedData/Video-hedtrampxpseetfcmcksycqvmpuk/Build/Products/Debug-iphonesimulator/Video.app/Video normal i386
    cd "/Users/michaelsonsamuels/Desktop/Xcode /Video"
    setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
    setenv 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/iPhoneSimulator6.1.sdk -L/Users/michaelsonsamuels/Library/Developer/Xcode/DerivedData/Video-hedtrampxpseetfcmcksycqvmpuk/Build/Products/Debug-iphonesimulator -F/Users/michaelsonsamuels/Library/Developer/Xcode/DerivedData/Video-hedtrampxpseetfcmcksycqvmpuk/Build/Products/Debug-iphonesimulator -filelist /Users/michaelsonsamuels/Library/Developer/Xcode/DerivedData/Video-hedtrampxpseetfcmcksycqvmpuk/Build/Intermediates/Video.build/Debug-iphonesimulator/Video.build/Objects-normal/i386/Video.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework StoreKit -framework AudioToolbox -framework MessageUI -framework SystemConfiguration -framework CoreGraphics -framework UIKit -framework Foundation -o /Users/michaelsonsamuels/Library/Developer/Xcode/DerivedData/Video-hedtrampxpseetfcmcksycqvmpuk/Build/Products/Debug-iphonesimulator/Video.app/Video

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_GADBannerView", referenced from:
      objc-class-ref in ViewController.o
  "_OBJC_CLASS_$_GADRequest", referenced from:
      objc-class-ref in ViewController.o
  "_kGADAdSizeBanner", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ld /Users/michaelsonsamuels/Library/Developer/Xcode/DerivedData/Video-hedtrampxpseetfcmcksycqvmpuk/Build/Products/Debug-iphonesimulator/Video.app/Video normal i386
    cd "/Users/michaelsonsamuels/Desktop/Xcode /Video"
    setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
    setenv 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/iPhoneSimulator6.1.sdk -L/Users/michaelsonsamuels/Library/Developer/Xcode/DerivedData/Video-hedtrampxpseetfcmcksycqvmpuk/Build/Products/Debug-iphonesimulator -F/Users/michaelsonsamuels/Library/Developer/Xcode/DerivedData/Video-hedtrampxpseetfcmcksycqvmpuk/Build/Products/Debug-iphonesimulator -filelist /Users/michaelsonsamuels/Library/Developer/Xcode/DerivedData/Video-hedtrampxpseetfcmcksycqvmpuk/Build/Intermediates/Video.build/Debug-iphonesimulator/Video.build/Objects-normal/i386/Video.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework StoreKit -framework AudioToolbox -framework MessageUI -framework SystemConfiguration -framework CoreGraphics -framework UIKit -framework Foundation -o /Users/michaelsonsamuels/Library/Developer/Xcode/DerivedData/Video-hedtrampxpseetfcmcksycqvmpuk/Build/Products/Debug-iphonesimulator/Video.app/Video

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_GADBannerView", referenced from:
      objc-class-ref in ViewController.o
  "_OBJC_CLASS_$_GADRequest", referenced from:
      objc-class-ref in ViewController.o
  "_kGADAdSizeBanner", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

  "_OBJC_CLASS_$_GADBannerView", referenced from:


      objc-class-ref in ViewController.o


  "_OBJC_CLASS_$_GADRequest", referenced from:


      objc-class-ref in ViewController.o


  "_kGADAdSizeBanner", referenced from:


      -[ViewController viewDidLoad] in ViewController.o


ld: symbol(s) not found for architecture i386


clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks.

谢谢。

回答by Salman Zaidi

Your classes are missing from Build target. I don't know about your project structure and files but it looks like GADBannerView and GADRequest classes are missing.

Build 目标中缺少您的类。我不知道您的项目结构和文件,但看起来缺少 GADBannerView 和 GADRequest 类。

Remove these files from your project. add them again and remember to check "ADD TO TARGET" checkbox.

从您的项目中删除这些文件。再次添加它们并记住选中“添加到目标”复选框。

回答by Arbitur

Add the libGoogleAdMobAds.ato the Linked Frameworks and Libraries.

添加libGoogleAdMobAds.aLinked Frameworks and Libraries.

回答by hpp

this error shows that u haven't added GADBannerView, and GADRequest classes.

此错误表明您尚未添加 GADBannerView 和 GADRequest 类。

please check by following this steps:

请按照以下步骤检查:

in XCode select your Project in the Target Section then switch to BuildPhases->CompileSources

在 XCode 的目标部分中选择您的项目,然后切换到 BuildPhases->CompileSources

here check for GADBannerView.m and GADRequest.m files.

在这里检查 GADBannerView.m 和 GADRequest.m 文件。

XCode->Your Project in Target section->BuildPhases->CompileSources

XCode->您在目标部分中的项目->BuildPhases->CompileSources

hope this will help you.

希望这会帮助你。