quinta-feira, 10 de outubro de 2013

Build MySQL Driver for Qt 5 on Mac OSX Mavericks

That bugged me for awhile. But when I tried to compile the MySQL driver for Qt it compile fine. But somehow when putting the file inside the QTDIR/.../plugins/sqldrivers it wouldn't work! I just kept getting driver not loaded. And when calling QSqlDatabase::drivers() MySQL just wans't there.
Finally I found the solution:
  • open the terminal
  • navigate to sqldrivers on QTDIR folder
  • and run the command:
install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient_r.18.dylib libqsqlmysql.dylib

Now it works just fine!

Nenhum comentário:

Postar um comentário