I have problems with QMYSQL Driver!
-
Yes, I have mysql.pro now, and there is no output error message, but I can`t find the 4 files...
-
What do you have in your mysql.pro?
-
@QT += core
QT += sqlQT -= gui
TARGET = mysql
CONFIG += console
CONFIG -= app_bundleTEMPLATE = app
SOURCES += main.cpp
@but I`m guessing that must be other things in the file...
-
typically you would have also the following statements @
INCLUDEPATH ...
LIBS ...
@
I do not know the details of qmake, but possibly you can do as you did.Maybe should do a
@
mingw32-make clean
@
to clean up the directories and retry.
Unfportunately, I cannot give more or better advice, since I am not using mingw on windows. -
I need a good tutorial for helping me to make the QMYSQL Driver for Qt 2.2 ( latest version )
-
did you try "these":http://www.lmgtfy.com/?q=qmsql+tutorial+
-
Yes... I tried... I know how to use google...
-
Sorry, than I cannot help any further.
Good luck! -
Thanks for your help.
At the begin there is no mysql folder, but I made a new project named mysql and put it in the sqldrives. That is what should I do? Or I did it wrong?
-
There is (or at least should be) a mysql.pro file in your Qt sources. If there isn't, you either are not looking hard enough, or you have an incomplete installation of the Qt sources. The former is more likely. Just making up a .pro file yourself is obviously not going to result in a valid project that is going to help you build the drivers.
-
Andre I think I found the mysql.pro through the source files. I
ll try tomorrow to make the QMYSQL Driver. If I
ll have any problems, I`ll make a reply tomorrow. -
I found the right mysql.pro, I tiped
@
qmake "INCLUDE+=C:..." "LIBS+=C:...\libmysql.a" -o Makefile mysql.pro
mingw32-make
@then I got !http://img651.imageshack.us/img651/614/unledswx.png!
Where is the problem? -
Did you prepare the MySql libs for use with the MinGw compiler, as is described in the countless other topics you claimed to have read on this issue?
-
Yes I did. I crated the libmysql.a
-
@kallo here are the steps to build mysql plug-in driver ( and I assure you it works :-) ):
- download mysql-connector-c-noinstall-6.0.2-win32 binary package from mysql downloads.
- open %QTDIR%\src\plugins\sqldrivers\mysql\mysql.pro in QtCreator
- add LIBS and INCLUDEPATH in mysql.pro to match with your mysql-connector-c-noinstall-6.0.2-win32 path
- after mysql.pro is succesfully build, copy the qsqlmysqld4.dll + qsqlmysql4.dll in %QTDIR%\Desktop...etc...\plugins\sqldrivers (there should already be qsqlite4.dll)
- copy libmysql.dll in %QTDIR%\Desktop...etc...\bin
that's all
-
No cincirin, that is not all. It depends on your toolchain. If you use minGw, as kaloo is doing, you need some additional steps.
-
I use mingw toolchain and they work.
-
So I did how cincirin said
!http://img51.imageshack.us/img51/5876/unledcj.png!the output says
@
cannot find -libmysql
@Where should libmysql stay? or what I did wrong?
-
Do you have libmysql*.a* ? Don't you have libmysql.lib ?
Also you have to put only the path to libmysql.lib LIBS += yourPath -
I have libmysql.a