Sunday, July 6th 2008, 12:45am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Javi

Beginner

1

Wednesday, May 7th 2008, 1:10pm

Install Qt OpenSource in Windows + MySql

I'm trying to install QT 4.4.0 Opensource in a Windows Vista with MySql support since last week. For this purpose I had read about the install proccess in a different sites and more of them, match in this method:

1º) install the qt-win-opensource-4.4.0-rc1-mingw.exe (I install in c:\qt\ )
2º) install the mysql with their libraries.(I install in c:\mysql\ )
3º) Follow this steps:

Source code

1
2
3
c:\> cd mysql\lib\opt
c:\mysql\lib\opt> reimp -d libmysql.lib
c:\mysql\lib\opt> dlltool --input-def libmysql.def --dllname libmysql.dll --output-lib libmysql.a -k
(This is because the dll that comes with mysql is not compatible with qt)

Source code

1
2
3
c:\mysql\lib\opt> cd \qt
c:\qt\> configure -platform win32-g++ -shared -release -qt-sql-sqlite -qt-sql-mysql -l mysql -I c:\mysql\include -L c:\mysql\lib\opt
c:\qt\> mingw32-make

Well, when I run the mingw32-make, after a minute allways I get this error:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
gcc -c -O2 -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_BOOTSTRAPPED -DQT_RCC -DQT_LITE_UNICODE -DQT_NO_DATASTREAM -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_UNICODETABLES -DQT_NO_LIBRARY -DQT_NO_SYSTEMLOCALE -DQT_NO_GEOM_VARIANT -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NODLL -I"..\..\corelib\arch\generic" -I"..\..\..\include" -I"." -I"..\..\..\include\QtCore" -I"..\..\..\include\QtXml" -I"..\..\xml" -I"." -I"..\..\3rdparty\zlib" -I"." -I"..\..\..\mkspecs\win32-g++" -o tmp\obj\release_static\crc32.o ..\..\3rdparty\zlib\crc32.c
In file included from ..\..\3rdparty\zlib\crc32.c:29:
..\..\3rdparty\zlib\/zutil.h:21:24: stddef.h: No such file or directory
..\..\3rdparty\zlib\/zutil.h:23:22: string.h: No such file or directory
..\..\3rdparty\zlib\/zutil.h:24:22: stdlib.h: No such file or directory
..\..\3rdparty\zlib\/zutil.h:38:23: errno.h: No such file or directory
..\..\3rdparty\zlib\crc32.c:36:24: limits.h: No such file or directory
mingw32-make[2]: *** [tmp/obj/release_static/crc32.o] Error 1
mingw32-make[2]: Leaving directory `C:/qt/src/tools/rcc'
mingw32-make[1]: *** [release] Error 2
mingw32-make[1]: Leaving directory `C:/qt/src/tools/rcc'
mingw32-make: *** [sub-rcc-make_default-ordered] Error 2

The stddef.h are in c:\qt\MingGW\include\ directory. I'm trying to configure with:

Source code

1
configure -platform win32-g++ -static -release -qt-sql-sqlite -qt-sql-mysql -l mysql -I c:\mysql\include -L c:\mysql\lib\opt -I C:\qt\mingw\include

But, the error still appears. What I'm doing wrong?
Thanks for all.

This post has been edited 10 times, last edit by "Javi" (May 7th 2008, 2:51pm)

  • Go to the top of the page

Javi

Beginner

2

Thursday, May 8th 2008, 12:06pm

For making the MySQL driver I found this page (really good tutorial) but... still don't work on my computer. :(

http://www.jiggerjuice.net/software/qt-sql-drivers.html

Quoted

ksarkies say:
The files qsqlmysql.dll, qsqlmysqld.dll, libqsqlmysql.a, libqsqlmysqld.a will appear in your c:\qt\plugins\sqldrivers directory.

In my c:\qt\plugins\sqldrivers only appear libqsqlmysqld.a file, not qsqlmysql.dll file ?(
  • Go to the top of the page

Rate this thread