[SOLVED] SQL Driver problem with Qt 5.3.2



  • My configuration is:
    Qt Creator 3.2.1
    Based on Qt 5.3.2 (GCC 4.6.1, 64 bit)
    From revision 602746950b

    Running on Linux Mint 17 KDE 64 Bit

    I just upgraded to the new version today, using the maintenance tool and now my mysql drivers won't work. I had managed to get these working recently using the process below:

    @
    cd /home/mike/Qt/5.3/Src/qtbase/src/plugins/sqldrivers/mysql
    /home/mike/Qt/5.3/gcc_64/bin/qmake mysql.pro
    make
    sudo make install
    @

    I didn't think such a minor version change would have caused them to stop working.

    I checked all the paths were the same and ran the commands above as I did before, but I get the error:
    @
    g++ -c -pipe -I/usr/include/mysql -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I../../../../mkspecs/linux-g++ -I. -I/work/build/icu_install/include -I/home/mike/Qt/5.3/Src/qtbase/include/QtSql/5.3.1 -I/home/mike/Qt/5.3/Src/qtbase/include/QtSql/5.3.1/QtSql -I../../../../include -I../../../../include/QtSql -I/home/mike/Qt/5.3/Src/qtbase/include/QtCore/5.3.1 -I/home/mike/Qt/5.3/Src/qtbase/include/QtCore/5.3.1/QtCore -I../../../../include/QtCore -I.moc -o .obj/qsql_mysql.o ../../../sql/drivers/mysql/qsql_mysql.cpp
    ../../../sql/drivers/mysql/qsql_mysql.cpp:44:40: fatal error: QtSql/private/qsqldriver_p.h: No such file or directory
    #include <QtSql/private/qsqldriver_p.h>
    ^
    compilation terminated.
    make: *** [.obj/qsql_mysql.o] Error 1
    @

    When I run make.

    I get:
    @
    g++ -c -pipe -I/usr/include/mysql -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I../../../../mkspecs/linux-g++ -I. -I/work/build/icu_install/include -I/home/mike/Qt/5.3/Src/qtbase/include/QtSql/5.3.1 -I/home/mike/Qt/5.3/Src/qtbase/include/QtSql/5.3.1/QtSql -I../../../../include -I../../../../include/QtSql -I/home/mike/Qt/5.3/Src/qtbase/include/QtCore/5.3.1 -I/home/mike/Qt/5.3/Src/qtbase/include/QtCore/5.3.1/QtCore -I../../../../include/QtCore -I.moc -o .obj/qsql_mysql.o ../../../sql/drivers/mysql/qsql_mysql.cpp
    ../../../sql/drivers/mysql/qsql_mysql.cpp:44:40: fatal error: QtSql/private/qsqldriver_p.h: No such file or directory
    #include <QtSql/private/qsqldriver_p.h>
    ^
    compilation terminated.
    make: *** [.obj/qsql_mysql.o] Error 1
    @

    when I run sudo make install
    Any suggestions as to what I can do to make this work or is it a problem with the new version?


  • Lifetime Qt Champion

    Hi,

    Since you upgraded to 5.3.2, why are you using 5.3.1 sources ? Also, you should not need to use sudo since you installed Qt in your home directory.

    Where did you get the sources from ?



  • I down loaded the installer from the website, but missed checking which tick boxes were selected/unselected in the selection criteria.

    I uninstalled and reinstalled and it now works perfectly. Sorry about that.


Log in to reply
 

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