Results 1 to 20 of 40

Thread: MySQL Driver not loaded on PC without Qt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: MySQL Driver not loaded on PC without Qt

    If you are using the "Qt Sdk" (libraries+Creator) release of Qt be sure you copy files from the right directory.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    May 2010
    Location
    slovakia
    Posts
    47
    Thanks
    10
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Maemo/MeeGo

    Default Re: MySQL Driver not loaded on PC without Qt

    i got a same problem... on my machine i can find following

    locate qt|grep -i mysql
    /usr/include/qt4/Qt/qsql_mysql.h
    /usr/include/qt4/QtSql/QMYSQLDriver
    /usr/include/qt4/QtSql/QMYSQLResult
    /usr/include/qt4/QtSql/qsql_mysql.h
    /usr/lib/qt4/plugins/sqldrivers/libqsqlmysql.so
    /usr/share/doc/libqt4-sql-mysql
    /usr/share/doc/libqt4-sql-mysql/LGPL_EXCEPTION.txt
    /usr/share/doc/libqt4-sql-mysql/changelog.Debian.gz
    /usr/share/doc/libqt4-sql-mysql/changelog.gz
    /usr/share/doc/libqt4-sql-mysql/copyright
    /var/lib/dpkg/info/libqt4-sql-mysql.list
    /var/lib/dpkg/info/libqt4-sql-mysql.md5sums

    is the /usr/lib/qt4/plugins/sqldrivers/libqsqlmysql.so right library???

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: MySQL Driver not loaded on PC without Qt

    Huh, are we now talking about Linux? Wasn't it windows in the first

    EDIT: Ah, different guy! You are targeting which distro? The most have qt installed, so you normally don't need to deliver the Qt libraries along your application.

    EDIT 2: Yeah, noticed that. Took a while...

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: MySQL Driver not loaded on PC without Qt

    It's another guy.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Sep 2010
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MySQL Driver not loaded on PC without Qt

    i'm using the qt sdk and i took the dll from the qt/bin-folder (except the qsqlmysql4.dll of course).

    doesn't QApplication only looks in the given library paths for plugins?
    normally it searches in qt/plugins/ and the app-folder. i removed both using setLibraryPath(""), but still the qsqlmysql4.dll in qt/plugins was found and used. this is confusing

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: MySQL Driver not loaded on PC without Qt

    The plugin has to reside in a sqldrivers subdirectory of the directory containing the binary of your application.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Sep 2010
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MySQL Driver not loaded on PC without Qt

    you mean like this:

    "2nd try:

    /App/app.exe
    .
    .
    .
    /App/sqldrivers/qsqlmysql4.dll"

    i already tried this :/

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: MySQL Driver not loaded on PC without Qt

    Maybe you were missing something else too, like the MySQL client library.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Sep 2010
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MySQL Driver not loaded on PC without Qt

    Isn't this the libmysql.dll?
    It's in the /App-folder. If I try to put it somewhere else, the application won't start.
    Somewhere has to be an entry that tells something like "look only in qt/plugins for plugins no matter what you're supposed to do".
    Last edited by KTvsPeacock; 17th September 2010 at 13:34.

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: MySQL Driver not loaded on PC without Qt

    Quote Originally Posted by KTvsPeacock View Post
    It's in the /App-folder. If I try to put it somewhere else, the application won't start.
    It should start. Your main application shouldn't depend on the mysql client library. What does dependency walker say?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #11
    Join Date
    Sep 2010
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MySQL Driver not loaded on PC without Qt

    You were right: it starts without libmysql.dll.
    It depends on kernel32, mingwm10, msvcrt, libgcc_s_dw2-1, qtcore4, qtgui4, qtsql4, and qtwebkit4.dll

    ///
    This is what I get, when I call the libraryPaths()-method of my application:
    ("D:/Programme/Qt/qt/plugins", "C:/Release/nV/release")
    So I removed the first path calling removeLibraryPath("D:/Programme/Qt/qt/plugins").
    Called librayPath() again, got only the second path and still the application took the dll from the removed path.

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: MySQL Driver not loaded on PC without Qt

    But what exactly is the problem with the first path being there?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. mysql driver not loaded after deployment
    By tpf80 in forum Newbie
    Replies: 4
    Last Post: 4th September 2011, 10:12
  2. MySQL driver , I have, it still not loaded
    By bigkoma in forum Qt Programming
    Replies: 14
    Last Post: 30th January 2011, 10:38
  3. Sql Driver: MYSQL not loaded
    By stilgar in forum Qt Programming
    Replies: 2
    Last Post: 15th June 2010, 10:35
  4. MySQL driver not loaded
    By hami in forum Installation and Deployment
    Replies: 1
    Last Post: 12th May 2009, 19:54
  5. MySql Driver not loaded
    By eekhoorn12 in forum Installation and Deployment
    Replies: 13
    Last Post: 18th June 2007, 13:57

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
  •  
Qt is a trademark of The Qt Company.