开发者

GameKit / GameCenter - I386

开发者 https://www.devze.com 2023-02-18 21:34 出处:网络
I\'m having some hard time with the iOS GameCenter I\'m following some tutorials on youtube but as soon as I finish the code I get this error:

I'm having some hard time with the iOS GameCenter I'm following some tutorials on youtube but as soon as I finish the code I get this error:

Ld /Users/fgringo/Library/Developer/Xcode/DerivedData/Game-Center-Test-aggpqkxrazgvnseohuityqvchrnm/Build/Products/Debug-iphonesimulator/Game-Center-Test.app/Game-Center-Test normal i386
    cd /Users/fgringo/Documents/DEVELOPER/Game-Center-Test
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/fgringo/Library/Developer/Xcode/DerivedData/Game-Center-Test-aggpqkxrazgvnseohuityqvchrnm/Build/Products/Debug-iphonesimulator -F/Users/fgringo/Library/Developer/Xcode/DerivedData/Game-Center-Test-aggpqkxrazgvnseohuityqvchrnm/Build/Products/Debug-iphonesimulator -F/Users/fgringo/Documents/DEVELOPER/Game-Center-Test -filelist /Users/fgringo/Library/Developer/Xcode/DerivedData/Game-Center-Test-aggpqkxrazgvnseohuityqvchrnm/Build/Intermediates/Game-Center-Test.build/Debug-iphonesimulator/Game-Center-Test.build/Objects-normal/i386/Game-Center-Test.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework UIKit -framework Foundation -framework CoreGraphics -framework GameKit -framework MediaPlayer -o /Users/fgringo/Library/Developer/Xcode/DerivedData/Game-Center-Test-aggpqkxrazgvnseohuityqvchrnm/Build/Products/Debug-iphonesimulator/Game-Center-Test.app/Game-Center-Test

ld: warning: ignoring file /Users/fgringo/Documents/DEVELOPER/Game-Center-Test/GameKit.framework/GameKit开发者_如何学JAVA, missing required architecture i386 in file
ld: warning: ignoring file /Users/fgringo/Documents/DEVELOPER/Game-Center-Test/MediaPlayer.framework/MediaPlayer, missing required architecture i386 in file
Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_GKLocalPlayer", referenced from:
      objc-class-ref in GameCenterManager.o
  "_OBJC_CLASS_$_GKLeaderboard", referenced from:
      objc-class-ref in GameCenterManager.o
  "_OBJC_CLASS_$_GKScore", referenced from:
      objc-class-ref in GameCenterManager.o
  "_OBJC_CLASS_$_GKAchievement", referenced from:
      objc-class-ref in GameCenterManager.o
  "_OBJC_CLASS_$_GKPlayer", referenced from:
      objc-class-ref in GameCenterManager.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status


It looks like you haven't added the GameKit framework to your project.

If your using Xcode 3.2.x:

  • Right click the Frameworks group/folder in the file tree (on the left of the xcode window)
  • Press Add, and then select Existing Frameworks...
  • Scroll to GameKit.framework and double click it

If your using Xcode 4:

  • In the file tree, click on the project (the item at the top)
  • Select your target
  • Go to the Build Phases tab on the main panel
  • Expand the Link Binary with Libraries
  • Press the + button
  • Scroll to the GameKit.framework and double click it.


Did you add the GameKit.framework to your project?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号