If you use QtCreator you need the mysql plugin. This is copied into the install directory
.... /plugins/sqldrivers
You need the following
You can either create this withlibqsqlite.so
libqsqlmysql.so
libqsqlpsql.so
[CODE]
cd $QTDIR/src/plugins/sqldrivers/mysql
qmake "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient_r" mysql.pro
make
[>CODE]
or just use QtCreator and open the above project files, and compile, it could moan and display a error message as one cannot run a plugin directly.
Now one just has to copy the created xx.so files into the plugin directory.
On Ubuntu , you may need to install the development environment with
Qt Code:
sudo apt-get install libmysqlclient15-devTo copy to clipboard, switch view to plain text mode
Bookmarks