Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Undefined symbols for architecture arm64" when using Firebase C++ sdk

Tags:

c++

firebase

I downloaded the firebase c++ sdk, 10 jun 2016. I added the sdk into my iOS project, set the -objc into the other linker flags. And i got a linker error PLease advice.

The error log is as follows:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in libapp.a(app_ios_efc96a6f6f98f7443dddf841f7396489.o)
  "_OBJC_CLASS_$_FIROptions", referenced from:
      objc-class-ref in libapp.a(app_ios_efc96a6f6f98f7443dddf841f7396489.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

(EDIT 1) Framework search path:

 $(PROJECT_DIR)/ios/Libs/Firebase

The firebase is in the folder and the includes and the .a libraries.

like image 234
Eugene Lim Avatar asked Nov 27 '25 15:11

Eugene Lim


1 Answers

My problem when I got the same error was that I did not include the iOS SDK along with the C++ library. I did not realize that the C++ library DEPENDS on iOS SDK.

I thought that the the C++ library is a whole new code base that provides the potential for cross-platform development. However, you are still bound to only iOS or Android, but you can choose to code in C++ so you could reuse the C++ code in iOS and Android.

like image 84
kgaidis Avatar answered Nov 30 '25 04:11

kgaidis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!