Problem with the MySql-Driver



  • Hello,

    i have a problem with my MySql-Driver. I cant compile it.
    I`ve choose this Introduction (http://ieatbinary.com/2011/07/11/how-to-enable-mysql-support-in-qt-sdk-for-windows/) to compile the driver, but i dont can
    find libs or everything in the debug/release folder after them.
    If i compile the mysql-make, i dont can find errors.

    Please can you help me ?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Which version of Qt are you using on which version of Windows ? Using which compiler ?



  • I am use it on Window7. The QT Version is 5.1 and the Compilerversion of Mingw is 4.8. I hope so, that somebody can help me.


  • Lifetime Qt Champion

    Then you should rather follow this "guide":http://qt-project.org/doc/qt-5.1/qtsql/sql-driver.html#qmysql
    The methodology is important not the package number, they are a bit old



  • Okay thank you for this. Ive build Qt but Ive got an error with OpenGL.
    Can i compile QT without opengl ?

    Okay, here is the errorlog from the terminal:
    ....\include/QtGui/../../src/gui/opengl/qopengl.h:82:25: fatal error: GLES2/gl2
    .h: No such file or directory

    include <GLES2/gl2.h>

                         ^
    

    compilation terminated.
    Makefile.Debug:14438: recipe for target '.obj/debug_shared/qwindowsysteminterfac
    e.o' failed
    mingw32-make[3]: *** [.obj/debug_shared/qwindowsysteminterface.o] Error 1
    mingw32-make[3]: Leaving directory 'C:/Qt/Qt5.1.1/5.1.1/Src/qtbase/src/gui'
    Makefile:38: recipe for target 'debug-all' failed
    mingw32-make[2]: *** [debug-all] Error 2
    mingw32-make[2]: Leaving directory 'C:/Qt/Qt5.1.1/5.1.1/Src/qtbase/src/gui'
    Makefile:307: recipe for target 'sub-gui-make_first' failed
    mingw32-make[1]: *** [sub-gui-make_first] Error 2
    mingw32-make[1]: Leaving directory 'C:/Qt/Qt5.1.1/5.1.1/Src/qtbase/src'
    makefile:38: recipe for target 'sub-src' failed
    mingw32-make: *** [sub-src] Error 2

    Please can somebody show me, what i doing wrong ?

    Thank you
    lg, repac3r



  • Hi,

    You don't need to compile the whole Qt from source. Just grab the Qt SDK, install MySQL with the include and library files, and then navigate to this folder:
    @
    C:\QtInstallationDir\Src\qtbase\src\plugins\sqldrivers\mysql
    @
    Then build the plugin according to the instructions in the page SGaist gave you, adjusting accordingly, if needed, the paths/folders for your MySQL installation.

    I think the instructions need some polishing and updating because they don't mention the correct path to the sql driver plugins with the SDK, and many users ask for help with building the sql drivers very often.


Log in to reply
 

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