Why MySql driver doesn't come with the distribution?
-
Hello,
Could anyone explain me why MySql driver doesn't come with the QT SDK (4.7)? MySql is one of the most common and used database all over the world!
Building QT with MySql plugin under WINDOWS XP is just a pain in the arse!
I spent two days and no results so far. -
Have you tried this guide? "How to enable MySQL support in Qt SDK for Windows":http://www.pikopong.com/blog/2010/04/11/how-to-enable-mysql-support-in-qt-sdk-for-windows/
New link: http://ieatbinary.com/2011/07/11/how-to-enable-mysql-support-in-qt-sdk-for-windows/
-
-
Yes, Itried something very similar: it worked with QT 2010.02 but not with the current 2010.05!
First of all, qmake need a Makefile to run and you won't find any in that directory (it seems you need to run configure in order to have it renamed from the right one)!
Secondly, the final build yields errors (somewhere I read this is probably due to temporary files left in /tmp/moc/ directories that must be deleted!).I repeat: it's a pain in the arse...
-
Do you think it is necessary to build all the QT or just mysql driver?
I suppose that if I download windows installation package, binaries have been built with the same MINGW that is distributed along with QT SDK... Am I right? -
Yes, just building the driver should do it.
-
Well, it didn't work!
I wrote a simple application to test the drivers:int main(int argc, char *argv[])
{
QApplication a(argc, argv);
qDebug() << QSqlDatabase::drivers();return a.exec();
}
and I got building errors (from linker). I have a feeling that binaries for windows weren't compiled using the same mingw that comes along with the SDK distribution or at least the configuration is someway different...
Andre, could you please try it using the same QT SDK distribution under WINDOWS XP, MySQL Community Server 5.1.53 and let me know whether (or not) and how you succeeded?
Many thanks.
-
What errors did you had? I followed the same steps from my first link and it worked just fine (using the latest version)