我已经参考以下文档尝试在Cocos2d-x项目中设置Firebase广告,
毕竟,我一直在Xcode上遇到错误,
Showing All Messages
Ld /Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Intermediates.noindex/mygame.build/Debug-iphonesimulator/mygame-mobile.build/Objects-normal/x86_64/mygame.temp_caseinsensitive_rename-mobile normal x86_64 (in target: mygame-mobile)
cd /Volumes/Projects/Games/mygame_cpp/mygame/proj.ios_mac
export IPHONEOS_DEPLOYMENT_TARGET=9.3
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator -L/Volumes/Projects/Games/mygame_cpp/mygame/libraries/firebase_cpp_sdk/libs/ios/i386 -L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/FirebaseCore -L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/FirebaseInstanceID -L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/FirebaseMessaging -L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/GoogleUtilities -L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/Protobuf -L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/nanopb -L/Volumes/Projects/Games/mygame_cpp/mygame/proj.ios_mac/Pods -F/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator -F/Volumes/Projects/Games/mygame_cpp/mygame/proj.ios_mac/Pods/FirebaseAnalytics/Frameworks -F/Volumes/Projects/Games/mygame_cpp/mygame/proj.ios_mac/Pods/Google-Mobile-Ads-SDK/Frameworks/frameworks -F/Volumes/Projects/Games/mygame_cpp/mygame/proj.ios_mac/Pods/GoogleAppMeasurement/Frameworks -F/Volumes/Projects/Games/mygame_cpp/mygame/proj.ios_mac/../libraries/firebase_cpp_sdk/frameworks/ios/universal -FPods -FPods/Firebase -FPods/FirebaseAnalytics -FPods/FirebaseAnalyticsInterop -FPods/FirebaseCore -FPods/FirebaseInstanceID -FPods/FirebaseMessaging -FPods/Google-Mobile-Ads-SDK -FPods/GoogleAppMeasurement -FPods/GoogleUtilities -FPods/Headers -FPods/Local\ Podspecs -FPods/Protobuf -FPods/Target\ Support\ Files -FPods/nanopb -FPods/Firebase/CoreOnly -FPods/FirebaseAnalytics/Frameworks -FPods/FirebaseAnalyticsInterop/Interop -FPods/FirebaseCore/Firebase -FPods/FirebaseInstanceID/Firebase -FPods/FirebaseMessaging/Firebase -FPods/Google-Mobile-Ads-SDK/Frameworks -FPods/GoogleAppMeasurement/Frameworks -FPods/GoogleUtilities/GoogleUtilities -FPods/Headers/Private -FPods/Headers/Public -FPods/Protobuf/objectivec -FPods/Target\ Support\ Files/Firebase -FPods/Target\ Support\ Files/FirebaseAnalytics -FPods/Target\ Support\ Files/FirebaseAnalyticsInterop -FPods/Target\ Support\ Files/FirebaseCore -FPods/Target\ Support\ Files/FirebaseInstanceID -FPods/Target\ Support\ Files/FirebaseMessaging -FPods/Target\ Support\ Files/Google-Mobile-Ads-SDK -FPods/Target\ Support\ Files/GoogleAppMeasurement -FPods/Target\ Support\ Files/GoogleUtilities -FPods/Target\ Support\ Files/Pods-mygame-desktop -FPods/Target\ Support\ Files/Pods-mygame-mobile -FPods/Target\ Support\ Files/Protobuf -FPods/Target\ Support\ Files/nanopb -FPods/Firebase/CoreOnly/Sources -FPods/FirebaseAnalyticsInterop/Interop/Analytics -FPods/FirebaseCore/Firebase/Core -FPods/FirebaseInstanceID/Firebase/InstanceID -FPods/FirebaseMessaging/Firebase/Messaging -FPods/Google-Mobile-Ads-SDK/Frameworks/frameworks -FPods/GoogleUtilities/GoogleUtilities/AppDelegateSwizzler -FPods/GoogleUtilities/GoogleUtilities/Common -FPods/GoogleUtilities/GoogleUtilities/Environment -FPods/GoogleUtilities/GoogleUtilities/Logger -FPods/GoogleUtilities/GoogleUtilities/MethodSwizzler -FPods/GoogleUtilities/GoogleUtilities/NSData+zlib -FPods/GoogleUtilities/GoogleUtilities/Network -FPods/GoogleUtilities/GoogleUtilities/Reachability -FPods/GoogleUtilities/GoogleUtilities/UserDefaults -FPods/Headers/Private/Firebase -FPods/Headers/Private/FirebaseAnalyticsInterop -FPods/Headers/Private/FirebaseCore -FPods/Headers/Private/FirebaseInstanceID -FPods/Headers/Private/FirebaseMessaging -FPods/Headers/Private/GoogleUtilities -FPods/Headers/Private/Protobuf -FPods/Headers/Private/nanopb -FPods/Headers/Public/Firebase -FPods/Headers/Public/FirebaseAnalyticsInterop -FPods/Headers/Public/FirebaseCore -FPods/Headers/Public/FirebaseInstanceID -FPods/Headers/Public/FirebaseMessaging -FPods/Headers/Public/GoogleUtilities -FPods/Headers/Public/Protobuf -FPods/Headers/Public/nanopb -FPods/Protobuf/objectivec/google -FPods/FirebaseAnalyticsInterop/Interop/Analytics/Public -FPods/FirebaseCore/Firebase/Core/Private -FPods/FirebaseCore/Firebase/Core/Public -FPods/FirebaseInstanceID/Firebase/InstanceID/Public -FPods/FirebaseMessaging/Firebase/Messaging/InternalHeaders -FPods/FirebaseMessaging/Firebase/Messaging/Protos -FPods/FirebaseMessaging/Firebase/Messaging/Public -FPods/GoogleUtilities/GoogleUtilities/AppDelegateSwizzler/Internal -FPods/GoogleUtilities/GoogleUtilities/AppDelegateSwizzler/Private -FPods/GoogleUtilities/GoogleUtilities/Environment/third_party -FPods/GoogleUtilities/GoogleUtilities/Logger/Private -FPods/GoogleUtilities/GoogleUtilities/Logger/Public -FPods/GoogleUtilities/GoogleUtilities/MethodSwizzler/Private -FPods/GoogleUtilities/GoogleUtilities/Network/Private -FPods/GoogleUtilities/GoogleUtilities/Reachability/Private -FPods/GoogleUtilities/GoogleUtilities/UserDefaults/Private -FPods/Protobuf/objectivec/google/protobuf -filelist /Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Intermediates.noindex/mygame.build/Debug-iphonesimulator/mygame-mobile.build/Objects-normal/x86_64/mygame.temp_caseinsensitive_rename-mobile.LinkFileList -mios-simulator-version-min=9.3 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Intermediates.noindex/mygame.build/Debug-iphonesimulator/mygame-mobile.build/Objects-normal/x86_64/mygame.temp_caseinsensitive_rename-mobile_lto.o -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -stdlib=libc++ -fobjc-link-runtime -ObjC -lFirebaseCore -lFirebaseInstanceID -lFirebaseMessaging -lGoogleUtilities -lProtobuf -lc++ -lnanopb -lsqlite3 -lz -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreMedia -framework CoreTelephony -framework CoreVideo -framework FIRAnalyticsConnector -framework FirebaseAnalytics -framework FirebaseCoreDiagnostics -framework Foundation -framework GoogleAppMeasurement -framework GoogleMobileAds -framework MediaPlayer -framework MessageUI -framework MobileCoreServices -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework AdSupport -weak_framework JavaScriptCore -weak_framework SafariServices -weak_framework WebKit -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Intermediates.noindex/mygame.build/Debug-iphonesimulator/mygame-mobile.build/mygame.temp_caseinsensitive_rename-mobile.app-Simulated.xcent -lFirebaseCore -framework GameController -framework CoreText -liconv -framework Security /Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/libcocos2d\ iOS.a -framework CoreMotion -framework firebase_analytics -framework Foundation -framework UIKit -framework CoreGraphics -framework firebase_admob -framework OpenGLES -framework firebase_messaging -lz -framework QuartzCore -framework OpenAL -framework AVFoundation -framework AudioToolbox -lPods-mygame-mobile -framework firebase -Xlinker -dependency_info -Xlinker /Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Intermediates.noindex/mygame.build/Debug-iphonesimulator/mygame-mobile.build/Objects-normal/x86_64/mygame.temp_caseinsensitive_rename-mobile_dependency_info.dat -o /Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Intermediates.noindex/mygame.build/Debug-iphonesimulator/mygame-mobile.build/Objects-normal/x86_64/mygame.temp_caseinsensitive_rename-mobile
ld: warning: directory not found for option '-L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/FirebaseCore'
ld: warning: directory not found for option '-L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/FirebaseInstanceID'
ld: warning: directory not found for option '-L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/FirebaseMessaging'
ld: warning: directory not found for option '-L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/GoogleUtilities'
ld: warning: directory not found for option '-L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/Protobuf'
ld: warning: directory not found for option '-L/Users/dinindu/Library/Developer/Xcode/DerivedData/mygame-crtzcbnudpiajudmydiuicmjzbrt/Build/Products/Debug-iphonesimulator/nanopb'
ld: library not found for -lFirebaseCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)
https://github.com/firebase/quickstart-cpp/issues/10
还有更多...
# Uncomment the next line to define a global platform for your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'mygame-desktop' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for mygame-desktop
end
target 'mygame-mobile' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for mygame-mobile
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/AdMob'
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
end