mmaayeh
12th April 2009, 12:10
I tried the instructions to compile and build the MYSQL Plugin using the known instructions:
How to Build the QMYSQL Plugin on Windows
You need to get the MySQL installation files. Run SETUP.EXE and choose "Custom Install". Install the "Libs & Include Files" Module. Build the plugin as follows (here it is assumed that MySQL is installed in C:\MySQL):
cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\MySQL Server <version>\lib\opt\libmysql.lib" mysql.pro
nmake
If you are not using a Microsoft compiler, replace nmake with make in the line above.
Note: This database plugin is not supported for Windows CE.
Note: Including "-o Makefile" as an argument to qmake to tell it where to build the makefile can cause the plugin to be built in release mode only. If you are expecting a debug version to be built as well, don't use the "-o Makefile" option.
However, when do compile by changing nmake to make then I get the error:
C:\Qt\2009.01\qt\src\plugins\sqldrivers\mysql>C:\Qt\2009.01\qt\qmake\qmake "INCL
UDEPATH+=C:\Program Files\MySQL\MySQL Server 5.1\include" "LIBS+=C:\Program File
s\MySQL\MySQL Server 5.1\lib\opt\LIBMYSQL.LIB" C:\Qt\2009.01\qt\src\plugins\sqld
rivers\mysql\mysql.pro make
Could not find mkspecs for your QMAKESPEC(win32-g++) after trying:
C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_cre
ate_more/Troll/4.5.0/qt\mkspecs
Error processing project file: C:/Qt/2009.01/qt/src/plugins/sqldrivers/mysql/mys
ql.pro
Cannot find file: make.
The c:\qt-greenhouse directory does not exist on my machine therefore, what should have been the correct path relative to my machine?
How to Build the QMYSQL Plugin on Windows
You need to get the MySQL installation files. Run SETUP.EXE and choose "Custom Install". Install the "Libs & Include Files" Module. Build the plugin as follows (here it is assumed that MySQL is installed in C:\MySQL):
cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\MySQL Server <version>\lib\opt\libmysql.lib" mysql.pro
nmake
If you are not using a Microsoft compiler, replace nmake with make in the line above.
Note: This database plugin is not supported for Windows CE.
Note: Including "-o Makefile" as an argument to qmake to tell it where to build the makefile can cause the plugin to be built in release mode only. If you are expecting a debug version to be built as well, don't use the "-o Makefile" option.
However, when do compile by changing nmake to make then I get the error:
C:\Qt\2009.01\qt\src\plugins\sqldrivers\mysql>C:\Qt\2009.01\qt\qmake\qmake "INCL
UDEPATH+=C:\Program Files\MySQL\MySQL Server 5.1\include" "LIBS+=C:\Program File
s\MySQL\MySQL Server 5.1\lib\opt\LIBMYSQL.LIB" C:\Qt\2009.01\qt\src\plugins\sqld
rivers\mysql\mysql.pro make
Could not find mkspecs for your QMAKESPEC(win32-g++) after trying:
C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_cre
ate_more/Troll/4.5.0/qt\mkspecs
Error processing project file: C:/Qt/2009.01/qt/src/plugins/sqldrivers/mysql/mys
ql.pro
Cannot find file: make.
The c:\qt-greenhouse directory does not exist on my machine therefore, what should have been the correct path relative to my machine?