PDA

View Full Version : Qt with mysql connection ???



sai_3289
6th October 2012, 07:54
HI all,

While i was going through qt docs about mysql binding with QT, i came accross below lines of code(http://doc.qt.digia.com/4.7-snapshot/sql-driver.html)
cd $QTDIR/src/plugins/sqldrivers/mysql
qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
make
but in my qt installed directory i cant see mysql related files or folders in ("QTDIR/plugins/sqldrivers"),plz help me out frnds..........

Note:
1)Using fedora 14 os
2)installed qt using cmd prompt ,i.e (yum install qt)....installed at dis path usr/lib/qt4

Regards
sai

Cyrano
6th October 2012, 10:37
Have you executed the second part of the instructions?

cd $QTDIR/src/plugins/sqldrivers/mysql
make install

sai_3289
6th October 2012, 12:39
thanks for reply Cyrano .........actually there is no file or folder of mysql in SQLDRIVERS folder ( cd $QTDIR/src/plugins/sqldrivers/)

norobro
7th October 2012, 00:58
Those instructions are for compiling the mysql plugin from source.

Try using your package manager to search for libqsqlmysql.so. FWIW the Debian package is named libqt4-sql-mysql.