If you are using the "Qt Sdk" (libraries+Creator) release of Qt be sure you copy files from the right directory.
If you are using the "Qt Sdk" (libraries+Creator) release of Qt be sure you copy files from the right directory.
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???
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...
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![]()
The plugin has to reside in a sqldrivers subdirectory of the directory containing the binary of your application.
you mean like this:
"2nd try:
/App/app.exe
.
.
.
/App/sqldrivers/qsqlmysql4.dll"
i already tried this :/
Maybe you were missing something else too, like the MySQL client library.
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.
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.
But what exactly is the problem with the first path being there?
Bookmarks