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. QMYSQL driver not loaded on GCC compile
Forum Updated to NodeBB v4.3 + New Features

QMYSQL driver not loaded on GCC compile

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 3 Posters 1.2k 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.
  • md2012M Offline
    md2012M Offline
    md2012
    wrote on last edited by
    #1

    hello world.
    thnX for all your helps.now i have a full application which work and run smoothly on windows platform ,but now i optimized it to work on android as well but on the output consol of application i recive

    I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@19451bb time:278256342
    W libSportclub_v0-1a.so: (null):0 ((null)): QSqlDatabase: QMYSQL driver not loaded
    W libSportclub_v0-1a.so: (null):0 ((null)): QSqlDatabase: available drivers: QSQLITE
    

    my connection :

    SportClub::sqlmanager::sqlmanager()
    {
        db = QSqlDatabase::addDatabase("QMYSQL");
        db.setHostName("db4free.net");
        db.setPort(3306);
        db.setDatabaseName("******");
        db.setUserName("******");
        db.setPassword("******");
    }
    

    well libmysql.dll is in all of my compiler folders and it really works on windows so i don't know what to do.
    any idea dear programmers?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Schluchti
      wrote on last edited by
      #2

      Have you looked at this? http://wiki.qt.io/Build_Qt5_mysql_plugin_for_Android

      Want to read more about Qt?

      https://gympulsr.com/blog/qt/

      Latest Article: https://gympulsr.com/blog/qt/2017/06/14/ios-background-music-qt.html

      1 Reply Last reply
      1
      • md2012M Offline
        md2012M Offline
        md2012
        wrote on last edited by
        #3

        so i should build the MySQL libraries for android.
        if there was a more clear guide for it,that would be great because never done such thing before. but ill try to work it out.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Schluchti
          wrote on last edited by
          #4

          Yeah right, you have to build that yourself. I think the reason why it's not prebuild is that most of the apps don't interact directly with the database driver. The database transactions usually are hidden behind a well defined interace (e.q REST API). If you don't absolutely need to communicate directly with the database, I would also implement such an abstraction layer. Otherwise it could get really difficult if you decide at one point that you want to change your database system.

          Want to read more about Qt?

          https://gympulsr.com/blog/qt/

          Latest Article: https://gympulsr.com/blog/qt/2017/06/14/ios-background-music-qt.html

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

            Hi,

            To add to @Schluchti, it's usually a bad idea to open access to your database to the outside world.

            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

            • Login

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