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. Building MySQL driver for android

Building MySQL driver for android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
15 Posts 2 Posters 1.3k 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.
  • Q Offline
    Q Offline
    qtlearning
    wrote on last edited by
    #1

    I can't build mysql driver for android. I need a way to communicate my android app with mysql server. When I build my program the compiler output say: mysql driver not loaded. Available driver Qsqlite.
    I need help with this. I'm using qt 5.14.2 on window 10.

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

      Hi,

      There's no MySQL client library pre-built for Android. If anything you have to go with MariaDB and start from there.

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

      Q 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        There's no MySQL client library pre-built for Android. If anything you have to go with MariaDB and start from there.

        Q Offline
        Q Offline
        qtlearning
        wrote on last edited by
        #3

        @SGaist You say that I need to build the driver with Mariadb connector. I can use the same procedure for window!?

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

          No, you first have to cross-compile the MariaDB connector and then build the driver.

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

          Q 1 Reply Last reply
          0
          • SGaistS SGaist

            No, you first have to cross-compile the MariaDB connector and then build the driver.

            Q Offline
            Q Offline
            qtlearning
            wrote on last edited by
            #5

            @SGaist Excuse me, I'm new in this. I can build my programs for android, additionally I need to make cross compilation!? Or just tu build Mariadb drive?

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

              A quick search would have gotten you the Wiki page for the procedure.

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

              Q 1 Reply Last reply
              2
              • SGaistS SGaist

                A quick search would have gotten you the Wiki page for the procedure.

                Q Offline
                Q Offline
                qtlearning
                wrote on last edited by
                #7

                @SGaist Sorry, I'm trying to build the driver according to wiki page but command make isn't found it. Can I use qmake or I just need to add make to the environment variables!?

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

                  No you can't use qmake in place of make as these are two different tools for different purposes.

                  You can try using jom.exe

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

                  Q 2 Replies Last reply
                  0
                  • SGaistS SGaist

                    No you can't use qmake in place of make as these are two different tools for different purposes.

                    You can try using jom.exe

                    Q Offline
                    Q Offline
                    qtlearning
                    wrote on last edited by
                    #9

                    @SGaist When I´m triying to build and It close .sh with this NOTE: If in doubt, on Unix-ish systems use './config'.
                    make: *** No se especific▒ ning▒n objetivo y no se encontr▒ ning▒n makefile. Alto.
                    Changes:
                    diff: ./rootfs_files_before.txt: No such file or directory

                    1 Reply Last reply
                    0
                    • SGaistS SGaist

                      No you can't use qmake in place of make as these are two different tools for different purposes.

                      You can try using jom.exe

                      Q Offline
                      Q Offline
                      qtlearning
                      wrote on last edited by
                      #10

                      @SGaist It looks like there is no makefile file. What other option could have to generate the driver for android in Window.

                      Q 1 Reply Last reply
                      0
                      • Q qtlearning

                        @SGaist It looks like there is no makefile file. What other option could have to generate the driver for android in Window.

                        Q Offline
                        Q Offline
                        qtlearning
                        wrote on last edited by
                        #11

                        @qtlearning # OpenSSL
                        pkg=openssl-1.1.1g.tar.gz
                        dir=$(basename $pkg .tar.gz)

                        if [ ! -d $dir ]; then
                        wget -c http://www.openssl.org/source/$pkg
                        tar -xf $pkg || exit 1
                        fi

                        pushd $dir
                        if [ ! -f "skip" ] || [ "$no_skips" = true ]; then
                        RANLIB="$BR"ranlib CC="$BR"gcc ./Configure android-armv7 --prefix=$SR/usr #This line
                        ANDROID_DEV=$SR/usr make || exit 1
                        make build_libs || exit 1
                        touch skip
                        fi

                        Q 1 Reply Last reply
                        0
                        • Q qtlearning

                          @qtlearning # OpenSSL
                          pkg=openssl-1.1.1g.tar.gz
                          dir=$(basename $pkg .tar.gz)

                          if [ ! -d $dir ]; then
                          wget -c http://www.openssl.org/source/$pkg
                          tar -xf $pkg || exit 1
                          fi

                          pushd $dir
                          if [ ! -f "skip" ] || [ "$no_skips" = true ]; then
                          RANLIB="$BR"ranlib CC="$BR"gcc ./Configure android-armv7 --prefix=$SR/usr #This line
                          ANDROID_DEV=$SR/usr make || exit 1
                          make build_libs || exit 1
                          touch skip
                          fi

                          Q Offline
                          Q Offline
                          qtlearning
                          wrote on last edited by
                          #12

                          @SGaist I think the problem is in the line that says "this line". The "/. Config" is not running and no file is generated for the make to process. Or should I change the folder where the make is running?

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

                            Use KDAB's Android OpenSSL helper project

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

                            Q 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Use KDAB's Android OpenSSL helper project

                              Q Offline
                              Q Offline
                              qtlearning
                              wrote on last edited by
                              #14

                              @SGaist Excuse me, I found that the problem to create the driver is that the configure statement was not working. Check the information, I corrected it and now I get that the gcc compiler cannot find it due to the address given in the script. So I try to use clang, which is the one that brings the new ndk and I keep jumping the same error. What could I do?

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

                                Did you use the KDAB project I linked ?

                                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

                                • Login

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