Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

mysql library, not a Qt plugin



  • Hi, I'm having no success in installing the mysql driver plugin. Using SDK 10.14 on MacOS (reverted back from 10.15), Qt 5.13.1.

    After running

    ~/Qt/5.13.1/clang_64/bin/qmake "INCLUDEPATH+=/usr/local/opt/mysql@5.6/include/mysql" "LIBS+=/usr/local/opt/mysql@5.6/lib/libmysqlclient.18.dylib" mysql.pro

    Everything compiles except for -framework MobileCoreServices -lm -framework UIKit in the Makefiles.

    After removing these frameworks and compiling I get this error:

    QMachOParser: '/Users/sten/Qt/5.13.1/clang_64/plugins/sqldrivers/libqsqlmysql.dylib' is not a Qt plugin

    Any help with that?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What do you get if your run otool -L libqsqlmysql.dylib ?



  • Thanks for the quick response. This is otool -L:

    libqsqlmysql.dylib (compatibility version 0.0.0, current version 0.0.0)
    /usr/local/opt/mysql@5.6/lib/libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
    @rpath/QtSql.framework/Versions/5/QtSql (compatibility version 5.13.0, current version 5.13.1)
    @rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.13.0, current version 5.13.1)
    /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1670.10.0)
    /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1670.10.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 800.6.0)


  • Lifetime Qt Champion

    I would rename mysql@5.6 to something like mysql_5.6. I think that using the @ char there might be wreaking havoc.



  • @SGaist
    I changed the name of mysql@5.6 to mysql5.6 but still Qt does not recognise the plugin.
    Even if I can recompile sqlite and other plugins without problem, it does not work for mysql. Any recommendation?

    oTool:
    libqsqlmysql.dylib (compatibility version 0.0.0, current version 0.0.0)
    /usr/local/Cellar/mysql5.6/5.6.43/lib/libmysqlclient.dylib (compatibility version 18.0.0, current version 18.0.0)
    @rpath/QtSql.framework/Versions/5/QtSql (compatibility version 5.13.0, current version 5.13.1)
    @rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.13.0, current version 5.13.1)
    /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1670.10.0)
    /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1670.10.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 800.6.0)


  • Lifetime Qt Champion

    Start your application with the QT_DEBUG_PLUGINS environment variable set to 1.

    It might give you more clues about what is happening.


Log in to reply