开发者

How to enable MySQL support in Qt SDK for Windows

I am trying to build a driver in order to connect Qt with MySQL

I followed the steps in this weblink http://www.pikopong.com/blog/2010/04/11/how-to-enable-mysql-support-in-qt-sdk-for-windows/ but I got an error when I typed the command mingw32-make

The errors are :

C:\Qt\2009.04\qt\src\plugins\sqldrivers\mysql>mingw32-make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Qt/2009.04/qt/src/plugins/sqldrivers/mys
ql'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -
DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\i
nclude\QtSql" -I"..\..\..\..\include" -I"c:\MySQL\MySQL" -I"Server" -I"5.5\inclu
de" -I"..\..\..\..\include\ActiveQt" -I"debug" -I"..\..\..\..\mkspecs\win32-g++"
 -o debug\main.o main.cpp
In file included from main.cpp:44:
../../../sql/drivers/mysql/qsql_mysql.h:52:19: mysql.h: No such file or director
y
In file included from main.cpp:44:
../../../sql/drivers/mysql/qsql_mysql.开发者_如何学Goh:107: error: expected `)' before '*' toke
n
mingw32-make[1]: *** [debug/main.o] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/2009.04/qt/src/plugins/sqldrivers/mysq
l'
mingw32-make: *** [debug] Error 2

C:\Qt\2009.04\qt\src\plugins\sqldrivers\mysql>mingw32-make
*******************

Please help me with this problem.How could I solve this errors ?

Thanks in advance! Wally!


IIANM, you shouldn't have set the %mySQLDIR% to a path that contains space. It should be something such as set %mySQLDIR%=C:\MySQL\MYSQLS~1.1. You can check the correct short path by using dir /x.

For an example:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\>cd MySQL

C:\MySQL>dir /x
 Volume in drive C is BOOTCAMP
 Volume Serial Number is 785F-A9E4

 Directory of C:\MySQL

07/11/2011  07:23 PM    <DIR>                       .
07/11/2011  07:23 PM    <DIR>                       ..
07/11/2011  07:23 PM    <DIR>          MYSQLS~1.1   MySQL Server 5.1
               0 File(s)              0 bytes
               3 Dir(s)  46,921,265,152 bytes free

C:\MySQL>cd MYSQLS~1.1

C:\MySQL\MYSQLS~1.1>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜