Linker command failed when I integrate Facebook iOS

Hello everyone, I am trying to integrate facebook into a new project in iOS with version 3.3 of cocos2d-x cpp. I followed step by step all the steps of this guide http://cocos2d-x.org/wiki/Facebook_integration_instruction_for_Cocos2d-x_and_Cocos2d-x-Lua_on_iOS.
When I compile the project with xCode resources are compiled, but when I get linking errors:

Undefined symbols for architecture x86_64:
“_GCControllerDidConnectNotification”, referenced from:
-[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2d iOS.a(CCController-iOS.o)
“_GCControllerDidDisconnectNotification”, referenced from:
-[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2d iOS.a(CCController-iOS.o)
“_MPMoviePlayerPlaybackDidFinishNotification”, referenced from:
-[UIVideoViewWrapperIos dealloc] in libcocos2d iOS.a(UIVideoPlayer-ios.o)
-[UIVideoViewWrapperIos setURL::] in libcocos2d iOS.a(UIVideoPlayer-ios.o)
“_MPMoviePlayerPlaybackStateDidChangeNotification”, referenced from:
-[UIVideoViewWrapperIos dealloc] in libcocos2d iOS.a(UIVideoPlayer-ios.o)
-[UIVideoViewWrapperIos setURL::] in libcocos2d iOS.a(UIVideoPlayer-ios.o)
OBJC_CLASS$_GCController”, referenced from:
objc-class-ref in libcocos2d iOS.a(CCController-iOS.o)
(maybe you meant: OBJC_CLASS$_GCControllerConnectionEventHandler)
OBJC_CLASS$_MPMoviePlayerController”, referenced from:
objc-class-ref in libcocos2d iOS.a(UIVideoPlayer-ios.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How can I fix it? thanks to all

The solution is: add this two framework

GameController.framework
MediaPlayer.framework

I think that the wiki must be updated

4 Likes

I had the same thing happen when integrating Soomla IAP library. The thing is, those linker errors are from the Cocos library, not the newly added library, so why weren’t these frameworks added before, and why weren’t these linker errors present before? I wonder if the Cocos library was linking to these in some other way, and the addition of the new library exposed the linking error?

1 Like

i have the same kind problem when using cocoapods to integrate Admob in my project.

[Edit]
look this http://stackoverflow.com/questions/24844766/linking-errors-when-adding-admob-to-ios-cocos2d-x-3-2

you’re dead on the spot. 3 years later and still having the same problem.