cocos2dx admob/firebase not woking - c++

I am trying to integrate firebase into my cocos2dx project using the following this link
I have install firebase core and firebase admob in pod file. My pod file looks like this:
**source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
# Replace "MyGame" with the name of your game.
target 'MyGame-mobile' do
pod 'Firebase'
pod 'Firebase/AdMob'
end**
I have successfully install admob and firebase in my project but I cannot use it in my project. As soon as I'm trying to add this header file into my project it gives me an error which looks like:
**The project does not compile. This is the error:
Apple Mach-O Linker (ld) Error Group
“OBJC_CLASS$_FIRApp”, referenced from:
“OBJC_CLASS$_FIROptions”, referenced from:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried to add $(inherited) in Build Settigs > “Other Linker Flags” and these errors disappear, but this persist:
Apple Mach-O Linker (ld) Error Group
clang: error: linker command failed with exit code 1 (use -v to see invocation)**

Related

Cocos2dx Firebase CPP without Pod Integration

I want to integrate Cocos2dx v4 cpp project with Firebase (I am using firebase_cpp_sdk_8.11.0). This has been successfully integrated in Android. The problem that I am facing right now is integrate with IOS (without Pod). I already followed this link https://medium.com/firebase-developers/how-to-use-firebase-in-ios-games-written-in-c-fef1a6a9f87d and official Google Firebase tutorial but still failed.
The step that I did was:
Create a new project Cocos2dx with command
cocos new CocosFirebase -p <com.your_company.your_game> -l cpp -d .
Download the firebase_cpp_sdk and put inside the folder (follow the tutorial made a folder third_party). Modify the CMakeLists.txt and add this code below
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/firebase_cpp_sdk)
target_link_libraries(${APP_NAME}
firebase_analytics
firebase_messaging
firebase_app
)
Run the cmake and try to build the project (inside the Xcode is also can). Without section 2 above, the project can be built successfully. With Firebase code in CMakeLists.txt, it failed with error below (error build both in simulator or product any ios device arm64 amv7).
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FIROptions", referenced from:
objc-class-ref in libfirebase_app.a(app_ios.mm.o)
"_OBJC_CLASS_$_FIRConfiguration", referenced from:
objc-class-ref in libfirebase_app.a(app_ios.mm.o)
"_OBJC_CLASS_$_UNUserNotificationCenter", referenced from:
objc-class-ref in libfirebase_messaging.a(messaging.mm.o)
"_OBJC_CLASS_$_FIRApp", referenced from:
objc-class-ref in libfirebase_app.a(app_ios.mm.o)
"_OBJC_CLASS_$_FIRMessaging", referenced from:
objc-class-ref in libfirebase_messaging.a(messaging.mm.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I also tried to link the library needed as stated in here Firebase Undefined symbols for architecture x86_64 but no luck. Or tried also to link directly inside the xcframework that provided from firebase cpp sdk.
Please note that I have successfully integrate with Android, and due to complexity and issue with Pod, I would like to integrate directly since Firebase also provide CPP SDK.
Any help will be much appreciated. Thanks.
I have exactly the same issue with my project using the Qt framework.
It looks like you're only using the firebase-cpp SDK.
This issue seems to be relative : https://github.com/firebase/firebase-cpp-sdk/issues/19
You might miss the native FirebaseIOS libs which the firebase-cpp-sdk wraps: https://firebase.google.com/download/ios

dyld: Library not loaded: /usr/local/lib/libwep on Mac for command make

When I run command "make", fellow error occurs:
MacBook-Pro~/Downloads/mp-boost$make
dyld: Library not loaded: /usr/local/lib/libwep
Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
Reason: no suitable image found. Did find:
/usr/local/lib/libwep: code signing blocked mmap() of '/usr/local/lib/libwep'
/usr/local/lib/libwep: code signing blocked mmap() of '/usr/local/lib/libwep'
make: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
make: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
How I can fix this error?

Link errors after pod install followed by attempted uninstall

I installed 'CoreStore' using cocoapods. one of the installed source (GCD) had over 30 compilation errors. I attempted to uninstall the module by running pod install on a Podfile without the module. However this is resulting in a link error ld: framework not found Pods_QwikFile
clang: error: linker command failed with exit code 1 (use -v to see invocation) .
How do I attempt to edit the link commands in Build Settings
Is it easier for me to edit the Link file directly. If so where do I find the link file
In the Build Phases part of the Target, I found clear reference to pod. I deleted the 2 entries and that eliminated the link errors.

Upgrading from Cocos2D 0.99.5 to 2.1 resulting in 3 errors

I was attempting to upgrade Cocos2D in my existing project resulting in issues no one knew how to solve, so I decided to start with fresh project then migrate my files over. I'm not sure when this happened but now I have 3 errors:
1.) Lexical or Preprocessor Issue
'XCTest/XCTest.h' file not found
2.) ld: file not found: /Users/Admin/Library/Developer/Xcode/DerivedData/test_cocos2d_proj-atnaeyeebjlopnbgbcqjaoeylldh/Build/Intermediates/test cocos2d proj.build/Debug-iphonesimulator/test cocos2d proj.build/Objects-normal/i386/cocos2d_libraryTests.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
3.) error: unable to open executable '/Users/Admin/Library/Developer/Xcode/DerivedData/test_cocos2d_proj-atnaeyeebjlopnbgbcqjaoeylldh/Build/Products/Debug-iphonesimulator/test cocos2d proj.app/test cocos2d proj'

Library not loaded on terminal but runs ok on Xcode

I built a command line tool within Xcode and it runs ok, but when I try to run it from the terminal it complains about one of my libs:
MacBook:Debug Jonathan$ ./MyApp
dyld: Library not loaded: /Users/Jonathan/Library/Frameworks/Josk.framework/Versions/A/Josk
Referenced from: /Users/Jonathan/Development/C++/MyApp/build/Debug/./MyApp
Reason: image not found
Trace/BPT trap
on my MyApp project I added a copy phase (destination: framework, no path and didn't mark the only-on-installing checkbox) to the target and on the directory of MyApp I can see the Josk.framework copied.
Thanks,
Jonathan
export DYLD_FRAMEWORK_PATH=/Users/Jonathan/Library/Frameworks
or
copy Josk.framework to /Users/Jonathan/Library/Frameworks
For deployment, there are various options such as #executable_path, #loader_path, #rpath.
see, man dyld