Yeah hello there, I'm really new here.
So here's the problem.I've checked many forums already and have done things so far:Qt Code:
QSqlDatabase: QMYSQL driver not loadedTo copy to clipboard, switch view to plain text mode
1) This is my .pro fileQt Code:
QT += core QT += sql QT -= gui TARGET = DB CONFIG += console CONFIG -= app_bundle QTPLUGIN += QSQLMYSQL TEMPLATE = app SOURCES += main.cppTo copy to clipboard, switch view to plain text mode
2) This is my sqldrivers folder:Qt Code:
alex@alex-Laptop:~/Programming/Qt/5.1.0/gcc_64/plugins/sqldrivers$ ls libqsqlite.so libqsqlmysql.so libqsqlpsql.soTo copy to clipboard, switch view to plain text mode
3) Have also copied sqldrivers folder to project folder.
Non of these helped an error still exists.
I have read almost everything about my problem but nothing helped.
Please help newbie with the fix.
Thanks in advance
I'm reviving this thread as it seems to be inactive without a answer to the problem and I was dealing with exactly the same problem for the past few days.
(with Opensuse 12.3, x86_64).
it seems that the compiled plugin that comes with the qt (qt-linux-opensource-5.1.0-x86_64-offline.bin) requires /usr/lib64/libmysqlclient_r.so.16 and opensuse comes with .18. So
doing
/usr/lib64 # ln -s libmysqlclient_r.so libmysqlclient_r.so.16
seems to solve the problem.
regards,
使用qt mysqlsql驱动模块出错,原来是libqsqlmysql.so 依赖 libmysqlclient16,而我机上的是libmysqlclient18,所以总是出问题,以后遇到这问题首先要解决的是库依赖的问题
联系客服