Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Why MySql driver doesn't come with the distribution?

Why MySql driver doesn't come with the distribution?

Scheduled Pinned Locked Moved Installation and Deployment
8 Posts 4 Posters 8.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    blueyes
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      aurorius
      wrote on last edited by
      #2

      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/

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mkfnx
        wrote on last edited by
        #3

        Here's another guide

        http://ga.maral.me/post/1705473515/building-and-deploying-qmysql-on-windows-with-mingw

        1 Reply Last reply
        0
        • B Offline
          B Offline
          blueyes
          wrote on last edited by
          #4

          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...

          1 Reply Last reply
          0
          • B Offline
            B Offline
            blueyes
            wrote on last edited by
            #5

            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?

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              Yes, just building the driver should do it.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                blueyes
                wrote on last edited by
                #7

                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&#40;&#41;;
                

                }

                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.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  aurorius
                  wrote on last edited by
                  #8

                  What errors did you had? I followed the same steps from my first link and it worked just fine (using the latest version)

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved