MySQL Plugin for Raspberry

  • Hi every body.

    I am developing an application with QT which will manage a database on a Raspberry and I have some problems with the MySQL plug-in.
    To install QT I followed this tutorial : link text
    I was able to cross-compile the MySQL plug-in with QT but when I try to load it with the code :

    QPluginLoader loader;
    std::cout << "Plugin Loader worked = " << QString::number(loader.load()).toStdString() << std::endl;
    std::cout << "Plugin Loader error = "  << loader.errorString().toStdString() << std::endl;

    I have this error :

    Plugin Loader worked = 0
    Plugin Loader error = Cannot load library /usr/local/qt5pi/plugins/sqldrivers/ (This platform does not support dynamic libraries.)

    I tried to recompile the plug-in at least 50 times but I have every time the same issue. Do you know why ?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What parameter did you pass when building Qt ?

    What distribution are you running on your Pi ?

  • Hi and thank you for your answer,
    When building Qt I configured it like this :

    ./configure -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v

    On the Raspberry I am running the last version of Raspbian : Raspbian Jessie with PIXEL


  • Lifetime Qt Champion

    Do you have the dependencies installed on your Pi ?

    By the way why are you trying to load the plugin by hand ?

  • I think I have installed all dependencies, how to check ?
    I load the plugin by hand just for the debug to have the error message.


  • Problem solved, I reinstall Raspbian and recompile Qt and now everythings works.


  • Lifetime Qt Champion

    Great !

    Happy coding !

Log in to reply