Results 1 to 4 of 4

Thread: QMYSQL for Android

  1. #1
    Join Date
    Feb 2008
    Posts
    79
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default QMYSQL for Android

    Hello!

    Is there a way to use QMYSQL driver on Android to use in addDatabase()? Have to use some data from Mysql database, and it would be great if that would work. It seems however that only QSQLITE is available by default.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMYSQL for Android

    Quote Originally Posted by Tiansen View Post
    Is there a way to use QMYSQL driver on Android to use in addDatabase()? Have to use some data from Mysql database, and it would be great if that would work. It seems however that only QSQLITE is available by default.
    Well, if the driver is not built you have to enable building it.
    https://wiki.qt.io/Build_Qt_5_MySQL_Plugin_for_Android

    Cheers,
    _

  3. #3
    Join Date
    Feb 2008
    Posts
    79
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QMYSQL for Android

    When following this guide I run into problem when linking libmariadb.so. I get "undefined reference to 'libiconv_*' message when running 'make install'. I checked and $SR/usr/lib/libiconv.a does exist. In "CMakeCache.txt" there is a correct path entry for libiconv.a. I cannot find and entry regarding iconv in other files in build/ directory however. Is there missing an additional entry somewhere or what could be wrong?

  4. #4
    Join Date
    Feb 2008
    Posts
    79
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QMYSQL for Android

    I tried to do the whole process a few times. I managed to resolve all issues I had, but I always have a problem with linking mariadb client. Linker just does not found libiconv functions that should be exported in libiconv library. Path to library that I pass in command line (see guide) is correct, I really don't understand what could be wrong. Any idea what to try?
    I also tried with Mysql connector, but it seems there are even more issues when building it for Android than with mariadb client. I also don't understand, why Qt Mysql plugin is available prebuilt for other platforms, but not for Android (not even in commercial version).

Similar Threads

  1. Replies: 0
    Last Post: 30th May 2015, 09:45
  2. Replies: 4
    Last Post: 10th July 2014, 15:22
  3. Android ARM vs Android x86 in qmake .pro file
    By sedi in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2014, 08:48
  4. How to load QMYSQL driver on Android?
    By adutzu89 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 24th April 2014, 14:26
  5. How do you make android applications display correctly on android phone?
    By Cyrebo in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 17th August 2013, 07:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.