[Linux] QMYSQL Plugin Build Failure on Qt 5.2.1
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?
Hi and welcome to devnet,
do you have any error messages that you can post?
What Linux are you using?
I am using Linux Mint 16 Mate.
And error i get running qmake is "Project ERROR: addExclusiveBuilds() requires at least two arguments"
There was no such an error while running same command in on Qt's 5.0.2 mysql.pro
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.16
But 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?
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
thank you for your reply!
I think that is what i needed from the very beginning.
And it is sad that Qt itself is not so 'inteligent' when speaking about plugins.
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.