QT编译mysql驱动出问题
我看了两篇帖子:1.http://heweiding155.
严格按照步骤操作,
六.运行qt 4.7.4 Command Prompt 输入以下命令(路径自己注意修改)
cd qt\4.7.4\src\plugins\sqldrivers\mysql
qmake
mingw32-make release
mingw32-make debug
单独运行mingw32-make,情况如下:
C:\Qt\4.7.4\src\plugins\sqldrivers\mysql>mingw32-make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Qt/4.7.4/src/plugins/sqldrivers/mysql'
Makefile.Debug:61: *** missing separator. Stop.
mingw32-make[1]: Leaving directory `C:/Qt/4.7.4/src/plugins/sqldrivers/mysql'
mingw32-make: *** [debug] Error 2
运行mingw32-make C:\Qt\4.7.4\src\plugins\sqldrivers\mysql\release情况如下:
C:\Qt\4.7.4\src\plugins\sqldrivers\mysql>mingw32-make C:\Qt\4.7.4\src\plugins\sq
ldrivers\mysql\release
mingw32-make: Nothing to be done for `C:\Qt\4.7.4\src\plugins\sqldrivers\mysql\r
elease'.
此路不同,我另看一篇帖子:http://onlycase.blog.
严格按照步骤执行:
成功生成了libmysql.def、libmysql.a,然而
D:\Qt\2010.05\qt\src\plugins\sqldrivers\mysql>mingw32-make
此时将会在目录D:\Qt\2010.05\qt\plugins\sqldrivers中生成
libqsqlmysqld4.a qsqlmysqld4.dll
libqsqlmysql4.a qsqlmysql4.dll
这四个文件,这就是我们所需要的Qt for MySQL驱动文件
我在这一步执行mingw32-make并没有生成这4个文件,结果如下:
C:\Qt\4.7.4\src\plugins\sqldrivers\mysql>mingw32-make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Qt/4.7.4/src/plugins/sqldrivers/mysql'
Makefile.Debug:61: *** missing separator. Stop.
mingw32-make[1]: Leaving directory `C:/Qt/4.7.4/src/plugins/sqldrivers/mysql'
mingw32-make: *** [debug] Error 2
我做不来了,如果有哪位好心朋友知道,麻烦帮助我解决一下这个问题,O(∩_∩)O谢谢