[SOLVED] MySQL driver for Debian
I need to build the QMYSQL driver for Debian Linux. Somehow I don't have "anything" in my sqldrivers -folder under my QT directory, in the plugins -folder? I had some trouble installing QT in the first place, as seen from this post: http://qt-project.org/forums/viewthread/36677
How can I download the complite QT package to my Debian machine with all the plugin templates etc. that I have on my Windows machine?
Hi, for me downloading "this ":http://download.qt-project.org/official_releases/qt/5.2/5.2.1/qt-opensource-linux-x64-5.2.1.run worked perfectly and - on another Debian derivate machine, the "online-installer ":http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x64-1.5.0-2-online.run made it, too.
Thank you for the answer. Unfortunately I cannot used the installers, because I'm running Debian on a virtually hosted machine, without X server (the GUI of Linux). I've tried to run these installers before, and I always get the error message:
@cannot connect to X server@
If it's impossible to load the sources for these plugins from Qt, does anyone know if it's possible to build the required MySQL driver for Linux, on a Windows machine? I need the libqmysql.so -file as far as I understand, can I compile the MySQL drivers from my Windows machine and produce the .so file?
It would be quicker to install a virtual machine matching your hosted machine and build what you need in there. Cross-compiling from window to linux is way more complicated.
For the long term, that's probably what I need to do.. Too bad a precompiled driver probably isn't available anywhere on the internet either, for downloading?
I actually have a Raspberry Pi at home with Debian in it (and X server installed), I guess I could try my luck with that! Won't have too much processing power for compiling, but then again I only need the driver for now :)
One of the problem is that depending on which distribution you have you won't have the same MySQL libraries installed, so you can't create a plugin that works on all platform (and in this case linux distributions)
Unless your hosted machine also run on ARM you won't be lucky ;)
Well, I downloaded the sources from "here":http://download.qt-project.org/official_releases/qt/5.2/5.2.1/single/qt-everywhere-opensource-src-5.2.1.tar.gz, and in this .zip the files are actually there. So I extracted them, and ran:
@qmake "INCLUDEPATH+=/usr/local/include/mysql" "LIBS+=-L/usr/lib/x86_64-linux-gnu -lmysqlclient_r" mysql.pro
Under my /usr/lib/x86_64-linux-gnu I have the following files:
but after running I get the error:
@Project ERROR: addExclusiveBuilds() requires at least two arguments
I can't believe this is so hard..
What version of Qt are you using to build these sources ?
qmake -v gives:
QMake version 3.0
Using Qt version 5.1.1 in /usr/lib/x86_64-linux-gnu
EDIT: Could it work if I try and find the 5.1.1 sources? Guess there's no harm trying :)
Indeed, that's what I was about to say. Get the corresponding sources, the build system can be updated from one version to the other.
[quote author="SGaist" date="1399363205"]Indeed, that's what I was about to say. Get the corresponding sources, the build system can be updated from one version to the other.
Well, after hours of trying, I got it to work :) I had 5.1.1 sources on my Windows machine, so I transfered them to my Linux machine. I only read your message afterwards, I'll probably still update the sources on my Linux from your link aswell later.
Rule of thumb: the zip file if for windows and the tar.gz is for unix like OS (line ending stuff)