Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Compile IBASE plugin in QT5 for Android
Qt 6.11 is out! See what's new in the release blog

Compile IBASE plugin in QT5 for Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
24 Posts 5 Posters 3.7k Views 2 Watching
  • 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.
  • R Offline
    R Offline
    RenanHm
    wrote on last edited by
    #1

    Good Morning.
    I'm trying to compile IBase plugin (Firebird 2.5.8) in QT5 for Android. I'm not getting it and I can't find documentation about it.

    Where can I find documentation about it?

    For Windows I can generate the plugin. Only for Android I can't and I can't find documentation on how to do it.

    Can anyone help with an idea?

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      @RenanHm said in Compile IBASE plugin in QT5 for Android:

      Firebird 2.5.8

      It is coded in C++. You build it as static(or dynamic) lib for android and link it to your app. You start it from here.
      https://doc.qt.io/qt-6/android-getting-started.html or
      https://doc.qt.io/qt-5/android-getting-started.html

      Post your questions if you have any issues.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RenanHm
        wrote on last edited by
        #3

        OK. I appreciate your feedback.
        I already have a Windows application developed in QT5 that accesses Firebird database.
        I have already compiled this same application for Android. The application is already running on Android. But I can't access the Firebird database on Android.
        I would like information or documentation on how to access a Firebird 2.5.8 database using QT5 on Android.

        Any suggestion?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Did you already read the documentation for that driver ?
          Do you have an Androïd build of the client library ?

          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
          0
          • R Offline
            R Offline
            RenanHm
            wrote on last edited by
            #5

            Hello.. here is the QT5 documentation I was looking at:

            https://doc.qt.io/qt-5/sql-driver.html#qibase

            I followed this documentation to generate the Ibase plugin for Windows.

            But to generate the ibase plugin for Android do I need to do it on Linux?? That is, do I need linux installed on the computer?

            I only have the libraries available on the Firebird website: https://firebirdsql.org/en/firebird-2-5-8/

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              No, you need to have the client libraries for Android. This is something you need to check with the FirebirdSQL folks.

              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
              0
              • R Offline
                R Offline
                RenanHm
                wrote on last edited by
                #7

                In the link https://firebirdsql.org/en/firebird-2-5-8/ I can download the Firebird libraries... it has several libs... but I don't know how to use it in QT5 to generate the Ibase plugin.

                I use Windows 10
                Firebird 2.5.8
                QT 5.14.2

                piervalliP 1 Reply Last reply
                0
                • JoeCFDJ Offline
                  JoeCFDJ Offline
                  JoeCFD
                  wrote on last edited by JoeCFD
                  #8

                  you install qt source code and then
                  cd $QTDIR/qtbase/src/plugins/sqldrivers
                  build sql drivers with qt environment for android. Qt android prebuilt libs include only lib for sqlite.
                  Basically you do the same steps as for windows and linux. For android, you need java and clang.

                  R 1 Reply Last reply
                  0
                  • R RenanHm

                    In the link https://firebirdsql.org/en/firebird-2-5-8/ I can download the Firebird libraries... it has several libs... but I don't know how to use it in QT5 to generate the Ibase plugin.

                    I use Windows 10
                    Firebird 2.5.8
                    QT 5.14.2

                    piervalliP Offline
                    piervalliP Offline
                    piervalli
                    wrote on last edited by
                    #9

                    @RenanHm , you should have virtual machine with Linux then compile the driver for Android manually.

                    1 Reply Last reply
                    0
                    • JoeCFDJ JoeCFD

                      you install qt source code and then
                      cd $QTDIR/qtbase/src/plugins/sqldrivers
                      build sql drivers with qt environment for android. Qt android prebuilt libs include only lib for sqlite.
                      Basically you do the same steps as for windows and linux. For android, you need java and clang.

                      R Offline
                      R Offline
                      RenanHm
                      wrote on last edited by
                      #10

                      Good Morning.
                      OK. I'll be more technical in what I'm trying to do:

                      I installed all QT5.14.2 with sources.. I also installed SDK, NDK, JDK for Android.
                      The application is working on both Windows and Android.

                      But on Android it is not accessing the Firebird database. I'm trying to compile the ibase plugin for android.

                      Access the project in C:\Qt\Qt5.14.2\5.14.2\Src\qtbase\src\plugins\sqldrivers\ibase and edit the ibase.pro project, according to the attached image "ibase.png". I've tried several Firebird files, but without success.
                      It always returns an error, as shown in the attached image "error.png".

                      The Android build kit is as per the attached image "kit.png".

                      The question is, don't I have enough Firebird libraries? (I took the ones available on the Firebird for Linux website).

                      Or do I need to install a linux operating system?? With QT and Firebird to generate this ibase plugin?

                      Thank you in advance for your attention.kit.png ibase.png erro.png

                      jsulmJ 1 Reply Last reply
                      0
                      • R RenanHm

                        Good Morning.
                        OK. I'll be more technical in what I'm trying to do:

                        I installed all QT5.14.2 with sources.. I also installed SDK, NDK, JDK for Android.
                        The application is working on both Windows and Android.

                        But on Android it is not accessing the Firebird database. I'm trying to compile the ibase plugin for android.

                        Access the project in C:\Qt\Qt5.14.2\5.14.2\Src\qtbase\src\plugins\sqldrivers\ibase and edit the ibase.pro project, according to the attached image "ibase.png". I've tried several Firebird files, but without success.
                        It always returns an error, as shown in the attached image "error.png".

                        The Android build kit is as per the attached image "kit.png".

                        The question is, don't I have enough Firebird libraries? (I took the ones available on the Firebird for Linux website).

                        Or do I need to install a linux operating system?? With QT and Firebird to generate this ibase plugin?

                        Thank you in advance for your attention.kit.png ibase.png erro.png

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @RenanHm said in Compile IBASE plugin in QT5 for Android:

                        I took the ones available on the Firebird for Linux website

                        I doubt they will work on Android. Also, the very first error seems to prove that: linker seems to skip the library as incompatible (can you translate the error?).
                        I think you need to build IBase client lib by yourself for Android.

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

                        R 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @RenanHm said in Compile IBASE plugin in QT5 for Android:

                          I took the ones available on the Firebird for Linux website

                          I doubt they will work on Android. Also, the very first error seems to prove that: linker seems to skip the library as incompatible (can you translate the error?).
                          I think you need to build IBase client lib by yourself for Android.

                          R Offline
                          R Offline
                          RenanHm
                          wrote on last edited by
                          #12

                          @jsulm It really seems too complicated.

                          Does the plugin have to be built by Linux??

                          How to build an Ibase library by myself??

                          jsulmJ 1 Reply Last reply
                          0
                          • R RenanHm

                            @jsulm It really seems too complicated.

                            Does the plugin have to be built by Linux??

                            How to build an Ibase library by myself??

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            @RenanHm said in Compile IBASE plugin in QT5 for Android:

                            Does the plugin have to be built by Linux??

                            You can also build on Windows. What matters is: for what platform do you build? You need IBase on Android, so you need IBase client library built for Android, just like your app is built for android.

                            "How to build an Ibase library by myself?" - download the source code and look for documentation there. Make sure you build using Android NDK.

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

                            1 Reply Last reply
                            1
                            • R Offline
                              R Offline
                              RenanHm
                              wrote on last edited by
                              #14

                              Hello.. building a driver alone I believe to be unfeasible.. I don't even know where to start.

                              Too bad QT is so complicated on some issues... I use Android Studio and added JayBird to connect to Firebird in an hour. Already with QT I'm trying for a few days and with no prospects of working.

                              I'm using Firebird 2.5.8 and 3.0 libraries... but somehow I can't compile.

                              Firebird version 3.0 has the arm libraries. But I noticed that it doesn't have the includes (.h). It only has the .so libraries.

                              Finally, do you have any other idea where my error is?

                              1 Reply Last reply
                              0
                              • JoeCFDJ Offline
                                JoeCFDJ Offline
                                JoeCFD
                                wrote on last edited by JoeCFD
                                #15

                                Firebird version 3.0 has the arm libraries. But I noticed that it doesn't have the includes (.h). It only has the .so libraries.
                                <== header files are the same. If you can find arm libs, you can simply copy include dir(s) for other builds(Linux or Windows) to arm build. Then you can build your app with arm libs and the include dir you copied.
                                It is not Qt that is complicated. It is Android which causes all troubles. It is not a great OS. But it is free. That is why it is used widely.

                                1 Reply Last reply
                                0
                                • R Offline
                                  R Offline
                                  RenanHm
                                  wrote on last edited by
                                  #16

                                  hello ok. See the steps I'm doing:

                                    1. Download Firebird 3.0 libraries from https://firebirdsql.org/en/firebird-3-0-10/
                                      firebird.png
                                  1. When unzipping it has this tree of files and directories:
                                    firebird2.png

                                  2. It does not have the header files (.h). But I get these files from another AMD64 Linux library
                                    Download: https://firebirdsql.org/en/firebird-3-0-10/
                                    firebird4.png

                                  3. Bibliotecas do Android ARM64.
                                    firebird3.png

                                  4. Configuration of the QT 5.14.2 IBase Project
                                    projeto.png

                                  5. Error when compiling
                                    erro.png

                                  This "undefined reference" error always occurs.
                                  It looks like the libraries are not correct.

                                  Can anyone help?
                                  I thank the attention.

                                  1 Reply Last reply
                                  0
                                  • JoeCFDJ Offline
                                    JoeCFDJ Offline
                                    JoeCFD
                                    wrote on last edited by JoeCFD
                                    #17

                                    since you built it for Windows and Linux, you can check its dependencies. Any third-party lib has to be rebuilt for Android as well. Which lib has isc_create_blob2?

                                    R 1 Reply Last reply
                                    0
                                    • JoeCFDJ JoeCFD

                                      since you built it for Windows and Linux, you can check its dependencies. Any third-party lib has to be rebuilt for Android as well. Which lib has isc_create_blob2?

                                      R Offline
                                      R Offline
                                      RenanHm
                                      wrote on last edited by
                                      #18

                                      @JoeCFD I don't know if I understand.. But the libraries available on the Firebird website are for Android. Theoretically, some of these ".so" libs should have a reference to "isc_create_blob2" and other functions. By the name I believe it should be the lib "libfbclient.so". Correct?

                                      jsulmJ 1 Reply Last reply
                                      0
                                      • R RenanHm

                                        @JoeCFD I don't know if I understand.. But the libraries available on the Firebird website are for Android. Theoretically, some of these ".so" libs should have a reference to "isc_create_blob2" and other functions. By the name I believe it should be the lib "libfbclient.so". Correct?

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #19

                                        @RenanHm Look for the first error message: in case you're using incompatible libraries the linker will tell you that.
                                        Also, I'm not sure the way you're adding IBase libs is correct: you should use LIBS instead (https://doc.qt.io/qt-6/qmake-variable-reference.html#libs). Check the linker call to see whether the libs are really passed to the linker.

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

                                        1 Reply Last reply
                                        0
                                        • R Offline
                                          R Offline
                                          RenanHm
                                          wrote on last edited by
                                          #20

                                          Hello.. I managed to compile the Ibase plugin!
                                          In the QT project, the option "armeabi-v7a" was checked and I needed to check the option "arm64-v8a". Now generated the Ibase plugin.

                                          abis.png

                                          I put the plugin "libplugins_sqldrivers_qsqlibase_arm64-v8a.so" in the folder "C:\Qt\Qt5.14.2\5.14.2\android\plugins\sqldrivers"
                                          My Android project identified the "QIBASE" plugin with the command "QSqlDatabase::drivers()"
                                          But I can't connect to the database at all. Even though the connection settings are correct, I can't connect to the database.

                                          Any idea of ​​the problem?

                                          1 Reply Last reply
                                          0

                                          • Login

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