Has anyone successfully built the mysql plugin for the Windows open source version using MinGW?
Has anyone successfully built the mysql plugin for the Windows open source version using MinGW?
yep!
What's your problem? Did you try passing related parameters to configure.exe?
Current Qt projects : QCodeEdit, RotiDeCode
I followed these directions:Originally Posted by fullmetalcoder
##########
The configure script cannot detect the neccessary libraries and include files if they are not in the standard paths, so it may be necessary to specify these paths using the -I and -L command-line options. For example, if your MySQL include files are installed in /usr/local/mysql (or in C:\mysql\include on Windows), then pass the following parameter to configure: -I/usr/local/mysql (or -I C:\mysql\include for Windows).
On Windows the -I parameter doesn't accept spaces in filenames, so use the 8.3 name instead; for example, use C:\progra~1\mysql instead of C:\Program Files\mysql.
Use the -qt-sql-<driver> parameter to build the database driver statically into your Qt library or -plugin-sql-<driver> to build the driver as a plugin. Look at the sections that follow for additional information about required libraries.
#############
and also tried these:
#############
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 -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=C:\MYSQL\LIB\OPT\LIBMYSQL.LIB" mysql.pro
nmake
If you are not using a Microsoft compiler, replace nmake with make in the line above.
#############
I have mysql installed to "C:\mysql", and chose to install headers and libraries during the install....
What am I missing?
-I"c:\Program Files\..." should work AFAIKOriginally Posted by ksqt
I'm using mingw32 and everything is fine. Dunno how to solve your case....
Current Qt projects : QCodeEdit, RotiDeCode
What verion of MySQL are you using?
What is the path?
Are you using MinGW with open source version?
Can you tell me exactly your commands to build Qt with the mysql plugin?
Thanks...
If you have no mingw-utils installed - install it. Then in %MYSQLDIR%\lib\opt do reimp libmysql.lib. Then go to %QTDIR%\src\plugins\sqldrivers\mysql and doOriginally Posted by ksqt
Note for double lib! reimp creates such file.qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=C:\MYSQL\LIB\OPT\liblibmysql.a" mysql.pro
Then make.
Then be happy
mingw-utils <---- where do I get this, and where to check if I already have?
Cool, thanks...!Originally Posted by L.Marvell
I now have a qsqlmysql.dll in \plugins\sqldrivers
Why the directions do not point out your instructions, as they do not work as written?
In some cases TT instructions work properly in some no. Maybe it depends on MySQL version, I don't really know.Originally Posted by ksqt
Oops. Mistake. TTs method works good under Linux but not under Windows.Originally Posted by L.Marvell
Now that mysql is working, here is what I wanted to do....
A mysql database table will be populated with Bulgarian words(cyrillic) and English words via web browser, using in a form:
Qt Code:
<form action="<?php echo $_SERVER[PHP_SELF] ?>" method="post" accept-charset="utf-8">To copy to clipboard, switch view to plain text mode
I can then read the cyrillic words in a web browser, but in my qt app, the cyrillic words come out garbled(strange characters).
Can anyone point me in the direction needed to be able to render the cyrillic characters?
Edit.....
Patching ".....\src\sql\drivers\mysql\qsql_mysql.cpp"
in this function
to thisQt Code:
{ #if MYSQL_VERSION_ID >= 32321 if (heuristicCodec) return heuristicCodec; #endif }To copy to clipboard, switch view to plain text mode
and again following directions given by "L.Marvell" accomplished my goal....Qt Code:
{ }To copy to clipboard, switch view to plain text mode
Thanks to a "Fanda" from the qt-interest mail group list for pointing me to this function.
Last edited by ksqt; 11th April 2006 at 18:40.
Help!!!!!!!
I try, try and try and i can't create the plugin for mysql, help me please
C:\PROGRA~1>cd mysql
C:\PROGRA~1\MySQL>cd mysqls~1.0
C:\PROGRA~1\MySQL\MYSQLS~1.0>cd lib\opt
C:\PROGRA~1\MySQL\MYSQLS~1.0\lib\opt>reimp libmysql.lib
C:\PROGRA~1\MySQL\MYSQLS~1.0\lib\opt>cd \qt
C:\Qt>cd 4.3.0
C:\Qt\4.3.0>cd src
C:\Qt\4.3.0\src>cd plugins
C:\Qt\4.3.0\src\plugins>cd sqldrivers
C:\Qt\4.3.0\src\plugins\sqldrivers>cd mysql
C:\Qt\4.3.0\src\plugins\sqldrivers\mysql>qmake
^C
C:\Qt\4.3.0\src\plugins\sqldrivers\mysql> qmake -o Makefile "INCLUDEPATH+=C:\PRO
GRA~1\MYSQL\MYSQLS~1.0\INCLUDE" "LIBS+=C:\PROGRA~1\MYSQL\MYSQLS~1.0\LIB\OPT\li bl
ibmysql.a" mysql.pro
C:\Qt\4.3.0\src\plugins\sqldrivers\mysql>make
mingw32-make -f Makefile.Release
Makefile.Release:116: *** multiple target patterns. Stop.
mingw32-make[1]: Entering directory `C:/Qt/4.3.0/src/plugins/sqldrivers/mysql'
mingw32-make[1]: Leaving directory `C:/Qt/4.3.0/src/plugins/sqldrivers/mysql'
mingw32-make: *** [release] Error 2
C:\Qt\4.3.0\src\plugins\sqldrivers\mysql>
Hi Marvell
I am trying to create a plugin for Mysql
I did ,what u have mentioned in above replies
My sql path isQt Code:
c:/Mysql/mysql-noinstall-5.1.38-win32/mysql-5.1.38-win32/lib/optTo copy to clipboard, switch view to plain text mode
here i executed reimp libmysql.lib in Mingw at above path
but it is showing
Qt Code:
sh: reimp: command not foundTo copy to clipboard, switch view to plain text mode
Please help me
Thanks
Yuvaraj R
Bookmarks