Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Linker error while adding Firebase SDK to QT project.
Forum Update on Monday, May 27th 2025

Linker error while adding Firebase SDK to QT project.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
17 Posts 5 Posters 895 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vidya485
    wrote on 18 Jun 2024, 08:33 last edited by
    #1

    Hello,
    I am need to firebase support for my qt project which is configured using qt5.15.
    I followed all steps mentioned at firebase doc but I am getting below errors while building project.

    arm64-v8a/main.obj: In function initializeFirebaseApp()': E:\Drone/EshmaGCS\src\main.cc:245: undefined reference to firebase::App::Create(firebase::AppOptions const&, _JNIEnv*, _jobject*)'
    E:\Drone/EshmaGCS\src\main.cc:253: undefined reference to firebase::auth::Auth::GetAuth(firebase::App*, firebase::InitResult*)' E:\Drone/EshmaGCS\src\main.cc:261: undefined reference to firebase::SetLogLevel(firebase::LogLevel)'
    arm64-v8a/main.obj: In function signInWithGoogle(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)': E:\Drone/EshmaGCS\src\main.cc:275: undefined reference to firebase::auth::Auth::GetAuth(firebase::App*, firebase::InitResult*)'
    E:\Drone/EshmaGCS\src\main.cc:277: undefined reference to firebase::auth::GoogleAuthProvider::GetCredential(char const*, char const*)' E:\Drone/EshmaGCS\src\main.cc:279: undefined reference to firebase::auth::Auth::SignInAndRetrieveDataWithCredential(firebase::auth::Credential const&)'
    arm64-v8a/main.obj: In function MutexLock': E:\Drone/EshmaGCS\libs\Firebase\firebase_cpp_sdk\include\firebase\internal\mutex.h:85: undefined reference to firebase::Mutex::Acquire()'
    arm64-v8a/main.obj: In function `~MutexLock':

    Can anyone help me to resolve the same?

    Thanks and Regards,
    Vidya Patil

    1 Reply Last reply
    0
    • J Online
      J Online
      jsulm
      Lifetime Qt Champion
      wrote on 18 Jun 2024, 08:44 last edited by
      #2

      Are the Firebase libs for arm64-v8a?
      How exactly did you add them (your pri or CMakeLists.txt file).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Vidya485
        wrote on 18 Jun 2024, 09:34 last edited by
        #3

        I added it in .pri file

        J 1 Reply Last reply 18 Jun 2024, 09:41
        0
        • V Vidya485
          18 Jun 2024, 09:34

          I added it in .pri file

          J Online
          J Online
          jsulm
          Lifetime Qt Champion
          wrote on 18 Jun 2024, 09:41 last edited by
          #4

          @Vidya485 I can't see the content of the pri file.
          Please post it as text.

          And please also answer my first question.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • V Offline
            V Offline
            Vidya485
            wrote on 18 Jun 2024, 09:47 last edited by
            #5

            I have downloaded firebase sdk from and it shows arm64-v8a under libs=>android

            image.png

            1 Reply Last reply
            0
            • V Offline
              V Offline
              Vidya485
              wrote on 18 Jun 2024, 10:28 last edited by
              #6

              I have included firebase libraries in android.pri

              image.png

              J 1 Reply Last reply 18 Jun 2024, 10:30
              0
              • V Vidya485
                18 Jun 2024, 10:28

                I have included firebase libraries in android.pri

                image.png

                J Online
                J Online
                JonB
                wrote on 18 Jun 2024, 10:30 last edited by
                #7

                @Vidya485 Do you think it is a good idea to add the same libraries from multiple architectures?

                1 Reply Last reply
                1
                • V Offline
                  V Offline
                  Vidya485
                  wrote on 18 Jun 2024, 10:46 last edited by
                  #8

                  @JonB, I am not sure about it, I am new to qt framework. I might be wrong but in qt5.15 I can see multi abi kit so I thought I might need to libraries from multiple architectures.

                  J 1 Reply Last reply 18 Jun 2024, 10:50
                  0
                  • V Vidya485
                    18 Jun 2024, 10:46

                    @JonB, I am not sure about it, I am new to qt framework. I might be wrong but in qt5.15 I can see multi abi kit so I thought I might need to libraries from multiple architectures.

                    J Online
                    J Online
                    jsulm
                    Lifetime Qt Champion
                    wrote on 18 Jun 2024, 10:50 last edited by
                    #9

                    @Vidya485 Remove all other architectures except the one you're trying right now - does it work?
                    How and where is ANDROID_EXTRA_LIBS used?
                    You can also check the build logs to see whether the libs are actualy linked.

                    And again: why do you post text as pictures?

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    1
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 18 Jun 2024, 20:13 last edited by
                      #10

                      Hi,

                      ANDROID_EXTRA_LIBS is for deploying additional libraries to the target. It has nothing to do with linking. Use the LIBS variable to setup proper linking.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • V Offline
                        V Offline
                        Vidya485
                        wrote on 20 Jun 2024, 04:43 last edited by
                        #11

                        Thank you all for your quick response and help. All linker errors are gone now and I could build apk. But my app is crashing when I open it.

                        Does qt5.15 supports latest firebase sdk i..e firebase_cpp_sdk_12.0.0 ?

                        1 Reply Last reply
                        0
                        • J Online
                          J Online
                          jsulm
                          Lifetime Qt Champion
                          wrote on 20 Jun 2024, 05:13 last edited by
                          #12

                          Did you debug your app to see where and why it is crashing?

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • V Offline
                            V Offline
                            Vidya485
                            wrote on 20 Jun 2024, 05:41 last edited by
                            #13

                            I tired app on two different android version

                            on Android 14 error was

                            AndroidRuntime: FATAL EXCEPTION: main
                            06-19 09:39:59.417 24868 24868 E AndroidRuntime: Process: org.eshma.eshmagcs, PID: 24868
                            06-19 09:39:59.417 24868 24868 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.eshma.eshmagcs/org.eshma.eshmagcs.QGCActivity}: java.lang.IllegalArgumentException: org.eshma.eshmagcs: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
                            06-19 09:39:59.417 24868 24868 E AndroidRuntime: Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

                            On Android 8 error was

                            ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=org.eshma.eshmagcs cmp=org.eshma.eshmagcs/.QGCActivity} from uid 10020
                            06-19 21:28:39.946 1345 2512 I ActivityManager: Start proc 7951:org.eshma.eshmagcs/u0a90 for activity org.eshma.eshmagcs/.QGCActivity
                            --------- beginning of crash
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: FATAL EXCEPTION: main
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: Process: org.eshma.eshmagcs, PID: 7951
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.eshma.eshmagcs/org.eshma.eshmagcs.QGCActivity}: java.lang.ClassNotFoundException: Didn't find class "org.eshma.eshmagcs.QGCActivity" on path: DexPathList[[zip file "/data/app/org.eshma.eshmagcs-P35fhwEYV0p61_KgFP-IRQ==/base.apk"],nativeLibraryDirectories=[/data/app/org.eshma.eshmagcs-P35fhwEYV0p61_KgFP-IRQ==/lib/arm64, /data/app/org.eshma.eshmagcs-P35fhwEYV0p61_KgFP-IRQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2682)
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2859)
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1592)
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6518)
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
                            06-19 21:28:40.184 7951 7951 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)

                            1 Reply Last reply
                            0
                            • J Online
                              J Online
                              jsulm
                              Lifetime Qt Champion
                              wrote on 20 Jun 2024, 05:55 last edited by
                              #14

                              This looks like the crashes are not related to the Firebase. Check whether your app also crashes if you remove Firebase libs completely.

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • V Offline
                                V Offline
                                Vidya485
                                wrote on 20 Jun 2024, 05:59 last edited by
                                #15

                                App was working fine till I add firebase libs and made changes related to firebase like adding build.gradle and all.

                                1 Reply Last reply
                                0
                                • Christian EhrlicherC Offline
                                  Christian EhrlicherC Offline
                                  Christian Ehrlicher
                                  Lifetime Qt Champion
                                  wrote on 20 Jun 2024, 06:13 last edited by
                                  #16

                                  Why not using the Qt InterBase sql plugin instead trying to directly link to the firebird libs?

                                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                  Visit the Qt Academy at https://academy.qt.io/catalog

                                  1 Reply Last reply
                                  0
                                  • V Offline
                                    V Offline
                                    Vidya485
                                    wrote on 20 Jun 2024, 07:07 last edited by
                                    #17

                                    I am new to Qt framework itself, what I am trying to achieve is

                                    • I have have customized QGroundcontrol GCS https://github.com/mavlink/qgroundcontrol
                                    • I want to add firebase support with- Google login
                                    • Want to get drone live location on fleet management app ( which is using firebase) for which GCSs will be sending data to firebase.

                                    I am not sure if Qt InterBase sql plugin will be able to achieve this.

                                    Any guidance and help would be greatly appreciated.

                                    1 Reply Last reply
                                    0

                                    1/17

                                    18 Jun 2024, 08:33

                                    • Login

                                    • Login or register to search.
                                    1 out of 17
                                    • First post
                                      1/17
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • Users
                                    • Groups
                                    • Search
                                    • Get Qt Extensions
                                    • Unsolved