you have only odbc sqlite plugins installed, I don't see mysql driver.
you have only odbc sqlite plugins installed, I don't see mysql driver.
So how do I install it?
Renan
C:\Utils\Qt\4.4.0\src\plugins\sqldrivers>qmake -o Makefile "INCLUDEPATH+=C:\Utils\MySQL5\include" "LIBS+=C:\Utils\MySQL5\lib\opt\l
ibmysql.dll" mysql.pro
Cannot find file: mysql.pro.
Renan
libmysql.lib don't dll
worng path, it should be like this
cd %QTDIR%\src\plugins\sqldrivers\mysql
another error:
C:\Utils\Qt\4.4.0\src\plugins\sqldrivers\mysql>qma ke -o Makefile "INCLUDEPATH+=C:\Utils\MySQL5\include" "LIBS+=C:\Utils\MySQL5\lib
\opt\libmysql.lib" mysql.pro
C:\Utils\Qt\4.4.0\src\plugins\sqldrivers\mysql>nma ke
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Utils\MicrosoftVisualStudio8\SDK\v2.0\Bin\nmake .exe -f Makefile.Debug all
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
rc -D_DEBUG -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_EDITION=QT_EDITION_DESKTOP -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FR
OM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -fo tmp\obj\debug_shared\qsqlmysqld_resource.res qsql
mysqld_resource.rc
qsqlmysqld_resource.rc(4) : fatal error RC1015: cannot open include file 'winver.h'.
NMAKE : fatal error U1077: 'C:\Utils\MicrosoftVisualStudio8\SDK\v2.0\Bin\rc.E XE' : return code '0x1'
Stop.
NMAKE : fatal error U1077: 'C:\Utils\MicrosoftVisualStudio8\SDK\v2.0\Bin\nmak e.exe' : return code '0x2'
Stop.
C:\Utils\Qt\4.4.0\src\plugins\sqldrivers\mysql>
did you set INCLUDE & LIB for VS?
here is my PATH, if thats what you are asking:
PATH
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\sy stem32\WBEM;C:\Utils\python25\;C:\Utils\Qt\4.4.0\b in;C:\Utils\MicrosoftVisualStudio8\SDK\v2.0\Bin;C: \Utils\MicrosoftVisualStudio8\VC\bin;C:\Utils\Micr osoftVisualStudio8\VC;C:\Utils\MySQL5\bin
Renan
this is PATH variable and I asked INCLUDE and LIB variables, anyway you should set these variables you can copy them from
VSDIR\Common7\Tools\vsvars32.bat
PATH:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\sy stem32\WBEM;C:\Utils\python25\;C:\Utils\Qt\4.4.0\b in;C:\Utils\MicrosoftVisualStudio8\SDK\v2.0\Bin;C: \Utils\MicrosoftVisualStudio8\VC\bin;C:\Utils\Micr osoftVisualStudio8\VC;C:\Utils\MySQL5\bin
INCLUDE:
C:\Utils\MicrosoftVisualStudio8\VC\ATLMFC\INCLUDE; C:\Utils\MicrosoftVisualStudio8\VC\INCLUDE;C:\Util s\MicrosoftVisualStudio8\VC\PlatformSDK\include;C: \Utils\MicrosoftVisualStudio8\SDK\v2.0\include
LIB:
C:\Utils\MicrosoftVisualStudio8\VC\ATLMFC\LIB;C:\U tils\MicrosoftVisualStudio8\VC\LIB;C:\Utils\Micros oftVisualStudio8\VC\PlatformSDK\lib;C:\Utils\Micro softVisualStudio8\SDK\v2.0\lib
And here is the output again:
C:\Utils\Qt\4.4.0\src\plugins\sqldrivers\mysql>qma ke -o Makefile "INCLUDEPATH+=C:\Utils\MySQL5\include" "LIBS+=C:\Utils\MySQL5\lib
\opt\libmysql.lib" mysql.pro
C:\Utils\Qt\4.4.0\src\plugins\sqldrivers\mysql>nma ke
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Utils\MicrosoftVisualStudio8\SDK\v2.0\Bin\nmake .exe -f Makefile.Debug all
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
rc -D_DEBUG -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_EDITION=QT_EDITION_DESKTOP -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FR
OM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -fo tmp\obj\debug_shared\qsqlmysqld_resource.res qsql
mysqld_resource.rc
cl -c -nologo -Zm300 -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_EDITION=QT_EDITI
ON_DESKTOP -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_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\Qt\4.4.0\incl
ude\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\moc\debug_share
d" -I"." -I"c:\utils\Qt\4.4.0\mkspecs\win32-msvc2003" -Fotmp\obj\debug_shared\ @C:\DOCUME~1\Renan\CONFIG~1\Temp\nm94.tmp
NMAKE : fatal error U1077: 'C:\Utils\MicrosoftVisualStudio8\VC\bin\cl.EXE' : return code '0xc0000135'
Stop.
NMAKE : fatal error U1077: 'C:\Utils\MicrosoftVisualStudio8\SDK\v2.0\Bin\nmak e.exe' : return code '0x2'
Stop.
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
you set wrong QMAKESPEC, your QMAKESPEC=win32-msvc2003 but in you case (if you use 2005 VS) must be QMAKESPEC=win32-msvc2005
ok
I changed my QMAKESPEC, but I still get some errors:
Qt Code:
Setting up a Qt environment... -- QTDIR set to C:\utils\Qt\4.4.0 -- Added C:\utils\Qt\4.4.0\bin to PATH -- QMAKESPEC set to "win32-msvc2005" C:\utils\Qt\4.4.0>cd src\plugins\sqldrivers\mysql C:\Utils\Qt\4.4.0\src\plugins\sqldrivers\mysql>qmake -o Makefile "INCLUDEPATH+=C:\Utils\MySQL5\include" "LIBS+=C:\Utils\MySQL5\lib \opt\libmysql.lib" mysql.pro C:\Utils\Qt\4.4.0\src\plugins\sqldrivers\mysql>nmake Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved. C:\Utils\MicrosoftVisualStudio8\SDK\v2.0\Bin\nmake.exe -f Makefile.Debug all Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved. cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_EDI 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_ 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\ 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 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. tmp NMAKE : fatal error U1077: 'C:\Utils\MicrosoftVisualStudio8\VC\bin\cl.EXE' : return code '0xc0000135' Stop. NMAKE : fatal error U1077: 'C:\Utils\MicrosoftVisualStudio8\SDK\v2.0\Bin\nmake.exe' : return code '0x2' Stop. 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.
did you try to build some application from examples?
were they built normally?
GuL (11th August 2008)
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
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
I don't know for sure, but I did in this order:
MySQL, QT and QT VS Integration.
Uninstall and install in that order.
Renan
Bookmarks