Eugene Lim
Eugene Lim

Reputation: 269

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

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.

Upvotes: 4

Views: 2222

Answers (1)

kgaidis
kgaidis

Reputation: 15609

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.

Upvotes: 1

Related Questions