Attn Qt programmer: need help with QMYSQL3 driver (error "not loaded")
Hello,
I am trying to write a simple Database application on 9.0 and it's acting
strange wrt the Qt MySQL drivers. I have also tried converting TrollTech's
example 'book1' database application (from teh Qt source tarball's example
dir) to use mysql and it give the same error.
It compiles fine but when try to run it I get the following error:
./<either one of the binaries>
QSqlDatabase warning: QMYSQL3 driver not loaded
QSqlDatabase: available drivers: QMYSQL3
Failed to open books database: Driver not loaded
Driver not loaded
All I have done to the book1 example is change ../connection.h: changed the
driver name, and
database/user/passwd/host.
I tried searching archives/web for this but the only thing similar I found
were people who didn't have the QMYSQL3 driver at all.
Is there some form of system-wide configuration I have to do to enable the use
of the mysql "driver"?
This is using SuSE 9.0 QT/KDE3 qt3-3.2.1 to be exact.
Can anyone explain what I need to do to "load" the driver, or what's wrong? I
can send a tarball (176K) to anyone who wants to have a look at it.
The application I'm trying to write is only 2 files, main.cpp and the .ui
file, main.cpp shown here:
---------------------CUT---------------------------
#include
Well I've just tried again on a SuSE 9.1 system, qt3-3.3.1 and I still get the same error. ./operators QSqlDatabase: QMYSQL3 driver not loaded QSqlDatabase: available drivers: QMYSQL3 QSQLITE Failed to open books database: Driver not loaded Driver not loaded Truly I can't understand it. Is there something I'm supposed to configure wrt the drivers? -- ---------------------------------------------------- Jonathan Wilson Cedar Creek Software http://www.cedarcreeksoftware.com
Well I've found that all of the drivers give the same error message, pretty much. I have tried sql-light and the postgres and ODBC drivers (not changing anything but the drivername) and I get the same response. Something in the system must not be configured right. Here's the latest error: orderclient@asset032:~/jw_qt_testing/chap12/cdtables> ./cdtables QSqlDatabase warning: QPSQL7 driver not loaded QSqlDatabase: available drivers: QMYSQL3 QPSQL7 QODBC3 CD tables is a whole new application from the trolltech book. What do I need to do to enable qt applications to find and read these modules? Thanks. -- ---------------------------------------------------- Jonathan Wilson Cedar Creek Software http://www.cedarcreeksoftware.com
participants (1)
-
JW