Solved QMYSQL driver not loaded on GCC compile
-
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 reciveI 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? -
Have you looked at this? http://wiki.qt.io/Build_Qt5_mysql_plugin_for_Android
-
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. -
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.
-
Hi,
To add to @Schluchti, it's usually a bad idea to open access to your database to the outside world.