Mysql in qt5
-
Hi All.
I have tested my application in Qt5 but I have a problem with mysql driver. It's not installed :-(I tried to compile the drive in Linux, but I have error. This is the command I have used for compile.
@qmake "INCLUDEPATH+=/usr/include" "LIBS+=-L/usr/lib -lmysqlclient_r" mysql.pro@
And the answer is:
WARNING: /home/arcnexus/Qt5.0.0/5.0.0/Src/qtbase/src/plugins/sqldrivers/qsqldriverbase.pri:4: Unable to find file for inclusion qt_plugin Project MESSAGE: Warning: unknown QT: sql-private
Please anyone know how to compile the driver in Qt5 and Linux?
-
I have the same problem....
Can anybody help us?
Thank in advance.
-
Hi All,
after several hours I've finally found quite a simple solution:
- Open the .pro in src/plugins/sqldrivers/psql (or mysql) with the Qt Creator.
- Modify the include in the Build Settings
- Build
In my case and after a message in the Creator I had to create /plugins temporarily then build again and move the libqsqlpsql.so to Qt5.0.0/5.0.0/gcc_64/plugins/sqldrivers
Works perfect now!
-
Hi ArcNexus,
in my case, I had to add "INCLUDEPATH+=/usr/include/postgresql" in the Build section and you should add a similar include for your mysqldriver.
I had lots of error messages like "Unknown modules" etc. - but it was all solved the described way.
I hope this may help you.
-