[SOLVED] Qt mysql driver not loaded (mint)
-
i guy i have a problem with qt and mysq, i try to connect with this code the db but i have this error:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITEi tried to install mysql driver with this guide: http://qt-project.org/doc/qt-4.8/sql-driver.html
but i dont'have the mysql folder, when i go to the installation folder of my qt i foud this situation
/usr/lib/i386-linux-gnu/qt5/plugins/sqldrivers there are two file: libsqllite.so and libsqlmysql.so.
help me!!! :-) please
-
-
thank's for the reply,but I use linux mint the guide is for windows.
-
-
thank's for this guide, but the error is the same, the driver is not avaible, i try more tutorial :-(
-
I have solved the problem with this procedure:
@usename@usename-pc ~ $ sudo apt-get install tasksel
usename@usename-pc ~ $ sudo tasksel install LAMP
usename@usename-pc ~ $ sudo tasksel install libmysqlclient-dev
usename@usename-pc ~ $ cd /home/usename/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/sqldrivers/mysql
usename@usename-pc ~ $ /home/usename/Qt5.0.2/5.0.2/gcc_64/bin/qmake "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/x86_64-linux-gnu -lmysqlclient_r" mysql.pro
usename@usename-pc ~ $ make
usename@usename-pc ~ $ make install@nb: usename=username
thank's