Building static source QSQLMYSQL.dll Issue



  • Hello, I just built the static source for my program on a new PC and I am getting the error:

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE
    QSqlError("", "Driver not loaded", "Driver not loaded")
    

    Do I have to rebuild the .dll's separate? If so, would flag would I add to the build? Also, what location is it checking for the .dll's because I checked the src/plugins/sqldrivers/ and all the drivers are there. I am not sure why only sqllite is appearing.



  • I have tried to rebuild the QSQLMYSQL.dll file and I have included the path to mysql 5.5 lib and include folder (with no spaces) and it compiles and builds but there is no debug or release folder output. Any suggestions? Only the .moc .obj and .pch folders are generated along with a Makefile, makefile.debug and makefile.release.
    I have installed the 32bit version of mysql connector and when I try to build it I use the command:

    qmake -o Makefile "INCLUDEPATH+=C:/test/include" "LIBS+=C:/test/lib/libmysql.lib" mysql.pro
    

    and then I build the dll by

    mingw32-make
    

    No errors are provided when I build it from q creator or through the qt cmd



  • I too am having this issue. Try:
    mingw32-make install


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What option did you pass to configure when you built Qt ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.