QMYSQL and CMAKE
I'm trying to compile an application with Qt's MYSQL driver and cmake. Everything compiles correctly, but when I start the application, I'm getting the following error:
@QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE@
Since my compilation works, I think it has something to do with the linking. I'm using Ubuntu and have installed the driver via apt-get: libqt4-sql-mysql.
Must I recompile Qt from source to include the driver, or should installing the library like I did work?
I've added the the necessary cmake code:
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtSql REQUIRED)
MESSAGE(FATAL ERROR "Qt SQL libraries missing.")
MESSAGE(FATAL ERROR "Qt4 not found.")
You don't have to recompile Qt, just the plugin if it comes to that...
Did you install Qt via apt-get too ?
Yes, I've installed Qt via apt-get too