Results 1 to 20 of 38

Thread: mysql 5 connection

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: mysql 5 connection

    please, show content of configure.cache

  2. #2
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: mysql 5 connection

    where is this file?

    Renan

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: mysql 5 connection

    in root of QTDIR folder, i.e. C:\Qt-4.4.0\configure.cache

  4. #4
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: mysql 5 connection

    I haven't found this file, but I found this one:

    .qmake.cache

    QMAKE_QT_VERSION_OVERRIDE = 4
    OBJECTS_DIR = tmp\obj\debug_shared
    MOC_DIR = tmp\moc\debug_shared
    RCC_DIR = tmp\rcc\debug_shared
    sql-plugins += odbc sqlite
    styles += windows plastique cleanlooks windowsxp windowsvista motif cde
    imageformat-plugins += gif tiff jpeg
    CONFIG += dist-config large-config medium-config minimal-config small-config full-config build_all debug incremental create_prl link_prl depend_includepath QTDIR_build
    QT_BUILD_PARTS = libs tools examples demos docs
    QMAKESPEC = C:\utils\Qt\4.4.0\mkspecs\win32-msvc2003
    ARCH = windows
    QT_BUILD_TREE = C:\utils\Qt\4.4.0
    QT_SOURCE_TREE = C:\utils\Qt\4.4.0
    DEFINES *= QT_EDITION=QT_EDITION_DESKTOP
    QMAKE_MOC = $$QT_BUILD_TREE\bin\moc.exe
    QMAKE_UIC = $$QT_BUILD_TREE\bin\uic.exe
    QMAKE_UIC3 = $$QT_BUILD_TREE\bin\uic3.exe
    QMAKE_RCC = $$QT_BUILD_TREE\bin\rcc.exe
    QMAKE_DUMPCPP = $$QT_BUILD_TREE\bin\dumpcpp.exe
    QMAKE_INCDIR_QT = $$QT_BUILD_TREE\include
    QMAKE_LIBDIR_QT = $$QT_BUILD_TREE\lib

  5. #5
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: mysql 5 connection

    you have only odbc sqlite plugins installed, I don't see mysql driver.

  6. #6
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: mysql 5 connection

    So how do I install it?

    Renan

  7. #7
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: mysql 5 connection

    Anybody has any ideia why using a commercial version of QT, I got this error?

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC QPSQL7 QPSQL

    Renan

  8. #8
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: mysql 5 connection

    you set wrong QMAKESPEC, your QMAKESPEC=win32-msvc2003 but in you case (if you use 2005 VS) must be QMAKESPEC=win32-msvc2005

  9. #9
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: mysql 5 connection

    ok

    I changed my QMAKESPEC, but I still get some errors:

    Qt Code:
    1. Setting up a Qt environment...
    2. -- QTDIR set to C:\utils\Qt\4.4.0
    3. -- Added C:\utils\Qt\4.4.0\bin to PATH
    4. -- QMAKESPEC set to "win32-msvc2005"
    5. C:\utils\Qt\4.4.0>cd src\plugins\sqldrivers\mysql
    6.  
    7. C:\Utils\Qt\4.4.0\src\plugins\sqldrivers\mysql>qmake -o Makefile "INCLUDEPATH+=C:\Utils\MySQL5\include" "LIBS+=C:\Utils\MySQL5\lib
    8. \opt\libmysql.lib" mysql.pro
    9.  
    10. C:\Utils\Qt\4.4.0\src\plugins\sqldrivers\mysql>nmake
    11.  
    12. Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
    13. Copyright (C) Microsoft Corporation. All rights reserved.
    14.  
    15. C:\Utils\MicrosoftVisualStudio8\SDK\v2.0\Bin\nmake.exe -f Makefile.Debug all
    16.  
    17. Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
    18. Copyright (C) Microsoft Corporation. All rights reserved.
    19.  
    20. cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_EDI
    21. TION=QT_EDITION_DESKTOP -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_
    22. SUPPORT -I"c:\utils\Qt\4.4.0\include\QtCore" -I"c:\utils\Qt\4.4.0\include\QtCore" -I"c:\utils\Qt\4.4.0\include\QtSql" -I"c:\utils\
    23. Qt\4.4.0\include\QtSql" -I"c:\utils\Qt\4.4.0\include" -I"c:\Utils\MySQL5\include" -I"c:\utils\Qt\4.4.0\include\ActiveQt" -I"tmp\mo
    24. c\debug_shared" -I"." -I"c:\utils\Qt\4.4.0\mkspecs\win32-msvc2005" -Fotmp\obj\debug_shared\ @C:\DOCUME~1\Renan\CONFIG~1\Temp\nm13.
    25. tmp
    26. NMAKE : fatal error U1077: 'C:\Utils\MicrosoftVisualStudio8\VC\bin\cl.EXE' : return code '0xc0000135'
    27. Stop.
    28. NMAKE : fatal error U1077: 'C:\Utils\MicrosoftVisualStudio8\SDK\v2.0\Bin\nmake.exe' : return code '0x2'
    29. Stop.
    30.  
    31. C:\Utils\Qt\4.4.0\src\plugins\sqldrivers\mysql>
    To copy to clipboard, switch view to plain text mode 

    Renan
    Last edited by GuL; 8th August 2008 at 14:42.

  10. #10
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: mysql 5 connection

    did you try to build some application from examples?
    were they built normally?

  11. The following user says thank you to spirit for this useful post:

    GuL (11th August 2008)

  12. #11
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: mysql 5 connection

    From the examples that came from QT, no. But I was folloing a tutorial to learn QT

    http://maven.smith.edu/~thiebaut/tutorials/

    And the have compiled fine. This is the first Im trying to connect to a database.

    Renan

  13. #12
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: mysql 5 connection

    Thats interesting: I was with this problem the whole week, and now it worked.

    Here is what I did: uninstall MySQL, QT and QT VS Integration. Restart the computer, and then install them all again.

    This should do the job. I don't know why this had done it work, but it did. Maybe there is a bug somewhere. I don't know.

    Thanks to all that tryied to help.

    Renan

  14. #13

    Default Re: mysql 5 connection

    Quote Originally Posted by GuL View Post
    Thats interesting: I was with this problem the whole week, and now it worked.

    Here is what I did: uninstall MySQL, QT and QT VS Integration. Restart the computer, and then install them all again.

    This should do the job. I don't know why this had done it work, but it did. Maybe there is a bug somewhere. I don't know.

    Thanks to all that tryied to help.

    Renan
    Should it be done in some specific order?

Similar Threads

  1. MySQL currency storage problem
    By MarkoSan in forum Qt Programming
    Replies: 2
    Last Post: 15th April 2008, 09:04
  2. mysql configuration with qt
    By bala in forum Installation and Deployment
    Replies: 3
    Last Post: 6th November 2007, 11:02
  3. qt4.3.1 mysql problem
    By twells55555 in forum Qt Programming
    Replies: 5
    Last Post: 8th October 2007, 21:26
  4. MySQL starting problem
    By shamik in forum General Discussion
    Replies: 5
    Last Post: 25th April 2007, 07:20
  5. Qt 4.1.4 & Mysql 5 on Linux x64
    By bothapn in forum Installation and Deployment
    Replies: 7
    Last Post: 4th August 2006, 13:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.