Results 1 to 14 of 14

Thread: QSqlDatabase: QMYSQL driver not loaded

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSqlDatabase: QMYSQL driver not loaded

    The configure script you talk about looks like the same one you get from the source distribution,
    AFTER you supposedly have installed everything.

    Therefore the procedure you seem to recommend is, to be complete:

    - install using the binary distribution by running qt-sdk-linux-x86_64-opensource-2010.01.bin
    (for documentation, run qt-sdk-linux-x86_64-opensource-2010.01.bin --help)
    (there are no options that let you install any SQL drivers)
    - go to the installed directory tree, find the ..sdk-2010.01/qt directory
    - do ./configure --help (as root, won't work as user), pick out the appropriate options
    - re-build what was installed in the first step with the usual configure/make/make install sequence

    Whereas installing from source is:

    - unpack the file qt-everywhere-opensource-src-4.6.1.tar.gz
    - do ./configure --help as plain user, pick out the appropriate options
    - build using the usual configure/make/make install sequence

    From configure --help, the options on the configure script relating to the sql drivers are these:
    Qt Code:
    1. -no-sql-<driver> ... Disable SQL <driver> entirely.
    2. -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
    3. none are turned on.
    4. -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
    5. at run time.
    6.  
    7. Possible values for <driver>:
    8. [ db2 ibase mysql oci odbc psql sqlite sqlite2 sqlite_symbian tds ]
    9.  
    10. -system-sqlite ..... Use sqlite from the operating system.
    To copy to clipboard, switch view to plain text mode 

    A lot of people on these forums seem to have a mental disorder that causes them to say, without apparent reason, that everything is in the docs

  2. #2
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QSqlDatabase: QMYSQL driver not loaded

    Quote Originally Posted by earthling View Post
    (there are no options that let you install any SQL drivers)
    I was referring to the command line options for the configure command, which you have so kindly listed, not the command line options for the installer.
    I'm not sure what you were expecting from the '.bin' installer with respect to how it gets installed. The point is that all configuration happens AFTER you run the '.bin' installer.

    - go to the installed directory tree, find the ..sdk-2010.01/qt directory
    - do ./configure --help (as root, won't work as user), pick out the appropriate options
    - re-build what was installed in the first step with the usual configure/make/make install sequence
    this is not needed if you just want to build the plugin.


    Whereas installing from source is:
    I have never installed *just* the src tar ball so I cannot comment on that but obviously you have to build the entire thing which takes hours.

    A lot of people on these forums seem to have a mental disorder that causes them to say, without apparent reason, that everything is in the docs
    and some people think they are just so smart and don't need to read documentation

    Look... the binary installer is the entire sdk and also includes the source - get it? Downloading the bin installer saves you from having to build the entire sdk if you can live with the default configuration which is dynamic linking.

    Like the output from the confgure --help command says 'by default none are turned on'.
    So, right after you install the sdk from the '.bin' installer you need to go to the mysql plugin src directory and build it. That's it. No need to do anything from the 2010.01/qt directory.

    Looks like in the end you figured it all out but you went through some steps that were not needed, however you've become more familiar with how things work in Qt - congrats.
    Last edited by schnitzel; 15th February 2010 at 18:18.

  3. #3
    Join Date
    Feb 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QSqlDatabase: QMYSQL driver not loaded

    Hello,

    I was wondering if any of you have had luck building this driver on OS X 10.5 using the QT 2010.2 package. As I've posted in this thread I am being thrown by the following two issues:

    - There is no /src/ directory in the QT installation. I have triple checked and I only see one QT installer for OS X so I am not sure how one could download QT without the source.
    - I have installed mysql and I have libmysqlclient.dylib , but there is no libmysqlclient.so . Does anyone know if working with a dynamic lib in QT is much different than a shared object?

    Many thanks!
    Lucas

  4. #4
    Join Date
    Nov 2008
    Posts
    22
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11

    Default Re: QSqlDatabase: QMYSQL driver not loaded

    Did you ever get this sorted out on your Mac OS X, I have the same issue and I'm searching for tips on how to get it working!

Similar Threads

  1. QSqlDatabase: QMYSQL driver not loaded
    By onder in forum Newbie
    Replies: 12
    Last Post: 29th March 2017, 14:43
  2. Help with QMYSQL driver for QT 4.4.0: driver not loaded
    By khikho in forum Installation and Deployment
    Replies: 4
    Last Post: 1st April 2011, 15:00
  3. Replies: 6
    Last Post: 28th April 2009, 06:58
  4. The strange problem:"QSqlDatabase: QMYSQL driver not loaded"
    By osmanthus in forum Installation and Deployment
    Replies: 2
    Last Post: 22nd January 2009, 15:12
  5. QMYSQL driver not loaded
    By sepehr in forum Qt Programming
    Replies: 12
    Last Post: 11th January 2009, 20:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.