[Linux] QMYSQL Plugin Build Failure on Qt 5.2.1
-
Hi,
the situation is that I have 3 versions of Qt: 4.8.4, 5.0.2 and 5.2.1.I was able to use QMYSQL Drivers on Qt 4.8.4 after installing libqt4-sql* libraries.
On Qt 5.0.2 I was able to do that following this "documentation":https://qt-project.org/doc/qt-5.0/qtsql/sql-driver.html#how-to-build-the-qmysql-plugin-on-unix-and-mac-os-x .
But I'm not able to do the same with Qt 5.2.1.Maybe anyone knows what I'm doing wrong?
Thanks.
-
Are you building with the Creator?
You should check your qmake settings and have a look at "Qt + MYSQL":http://qt-project.org/forums/viewthread/34763 -
Thank you very much!
I solved it by creating symlink:
ln -s /usr/lib/i386-linux-gnu/libmysqlclient_r.so /usr/lib/i386-linux-gnu/libmysqlclient_r.so.16But as someone mentioned in another thread:
"This seems to work in the first place but there has to be a better cleaner way to accomplish this."...
And another question about this solution: will it work well?
-
Hi,
If that symlink is missing, it generally means that you don't have the MySQL dev package installed. Just install it on your system and you should be good to go
-
What do you mean by not so intelligent about plugins ?
-
Well, I think there should be more "evolved" plugins menu, where you could just select e.g. 'MYSQL Plugin', press 'install selected plugins' and everything just starts to work. :)
Or, at least, when I run "apt-get install libqt5sql5-mysql" it should resolve dependencies and install mysql-dev as well :)
-
if "apt-get install libqt5sql5-mysql" doesn't pull what is necessary then it's either the package that is misconfigured (package which is not provided by the Qt project) or one of it's dependencies.