PDA

View Full Version : Problems building mysql plugin for Qt 4.1.2 on windows XP



Philip_Anselmo
16th May 2006, 21:27
Hello I've made the plugin without any problems worked with it... before

But now I have a little problem but i don't see where could it be located..
I just do everything as normal:


cd c:\mysql\lib\opt (c:\mysql is where our MySQL is installed)
reimp -d libmysql.lib (reimp comes with MinGW utilities)
dlltool -k --input-def libmysql.def --dllname libmysql.dll --output-lib libmysql.a

cd c:\qt\src\plugins\sqldrivers\mysql (c:\qt is where qt is installed)
qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=-LC:\MYSQL\LIB\OPT -lmysql" mysql.pro

make


but I get this output on make:



C:\Qt\4.1.2\src\plugins\sqldrivers\mysql>qmake -o Makefile "INCLUEDPATH+=C:\mysq
l\include" "LIBS+=-lC:\mysql\lib\opt -lmysql" mysql.pro

C:\Qt\4.1.2\src\plugins\sqldrivers\mysql>make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Qt/4.1.2/src/plugins/sqldrivers/mysql'
g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_N
O_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_
SQL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"C:/Qt/4.1.2/include/QtCore" -I"C:/Q
t/4.1.2/include/QtSql" -I"C:/Qt/4.1.2/include" -I"C:/Qt/4.1.2/include/ActiveQt"
-I"tmp\moc\release_shared" -I"." -I"C:/Qt/4.1.2/mkspecs/win32-g++" -o tmp\obj\re
lease_shared\main.o main.cpp
In file included from main.cpp:26:
../../../sql/drivers/mysql/qsql_mysql.h:34:19: mysql.h: No such file or director
y
In file included from main.cpp:26:
../../../sql/drivers/mysql/qsql_mysql.h:82: error: expected `)' before '*' token

mingw32-make[1]: *** [tmp\obj\release_shared\main.o] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/4.1.2/src/plugins/sqldrivers/mysql'
mingw32-make: *** [release] Error 2


I've tryed these four ways:



qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=-LC:\MYSQL\LIB\OPT -lmysql" mysql.pro

qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=-LC:\MYSQL\LIB\OPT\libmysql.lib" mysql.pro

qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=C:\MYSQL\LIB\OPT\libmysql.lib" mysql.pro

qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=-LC:\MYSQL\LIB\OPT\libmysql.a" mysql.pro


Any idea on what's wrong?:o :confused:

Help please :(

jacek
16th May 2006, 23:25
It should be INCLUDEPATH not INCLUEDPATH.

ksqt
17th May 2006, 05:16
http://www.qtcentre.org/forum/showthread.php?t=1738

This may help......

Philip_Anselmo
17th May 2006, 16:38
C:\Qt\412A7D~1.2\src\plugins\SQLDRI~1\mysql>qmake -o Makefile "INCLUDEPATH+=c:\mysql\include" "LIBS+=-Lc:\mysql\lib\opt -lmysql" mysql.pro

C:\Qt\412A7D~1.2\src\plugins\SQLDRI~1\mysql>make
mingw32-make -f Makefile.Debug all
mingw32-make[1]: Entering directory `C:/Qt/412A7D~1.2/src/plugins/SQLDRI~1/mysql
'
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
ime-pseudo-reloc -shared -Wl,--out-implib,C:\Qt\4.1.2\plugins\sqldrivers\libqsql
mysqld.a -o "C:\Qt\4.1.2\plugins\sqldrivers\qsqlmysqld.dll" tmp\obj\debug_shared
\main.o tmp\obj\debug_shared\qsql_mysql.o -L"C:\Qt\4.1.2\lib" -L"C:\Qt\4.1.2\li
b" -Lc:\mysql\lib\opt -Lc:\mysql\lib\opt -lmysql -lQtSqld4 -lQtCored4
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot fin
d -lQtSqld4
collect2: ld returned 1 exit status
mingw32-make[1]: *** [C:\Qt\4.1.2\plugins\sqldrivers\qsqlmysqld.dll] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/412A7D~1.2/src/plugins/SQLDRI~1/mysql'

mingw32-make: *** [debug-all] Error 2

:crying:

I've tryied with configure too
passing the -I c:\mysql\include
and -L c:\mysql\lib\opt

I even used the Qt 4.1.2 (Cuild Debug Libraries) link on the Startup Menu... I also edited the qtvars.bat so it included the mysql plugin modifing this line on the bat



configure -plugin-sql-mysql -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg -I c:\mysql\include -L c:\mysql\lib\opt


I added the ones on black :o
but in the end it sais this:



g++ -c -include tmp\obj\debug_shared\qt_gui_pch.h -g -g -Wall -frtti -fexception
s -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_BUILD_GU
I_LIB -DQT_MAKEDLL -DQT_NO_CAST_TO_ASCII -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_RAST
ER_IMAGEENGINE -DQT_RASTER_PAINTENGINE -DQT_HAVE_SSE -DQT_PDF_SUPPORT -DQT_NO_ST
YLE_MAC -DQT_DLL -DQT_CORE_LIB -I"C:/Qt/4.1.2/include/QtCore" -I"C:/Qt/4.1.2/inc
lude" -I"C:/mysql/include" -I"C:/Qt/4.1.2/include/QtGui" -I"tmp" -I"..\3rdparty\
wintab" -I"..\3rdparty\libpng" -I"..\3rdparty\zlib" -I"C:/Qt/4.1.2/include/Activ
eQt" -I"tmp\moc\debug_shared" -I"." -I"C:/Qt/4.1.2/mkspecs/win32-g++" -o tmp\obj
\debug_shared\qrc_qstyle.o tmp\rcc\debug_shared\qrc_qstyle.cpp
windres -i QtGuid_resource.rc -o tmp\obj\debug_shared\QtGuid_resource.o --includ
e-dir=.
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
ime-pseudo-reloc -shared -Wl,--out-implib,C:\Qt\4.1.2\lib\libQtGuid4.a -o "..\..
\lib\QtGuid4.dll" object_script.QtGuid.Debug -L"C:\Qt\4.1.2\lib" -L"C:\Qt\4.1.2
\lib" -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32
-luuid -luser32 tmp\obj\debug_shared\QtGuid_resource.o -Lc:\mysql\lib\opt -lmsim
g32 -lshell32 -lQtCored4
collect2: ld returned 5 exit status
mingw32-make[2]: *** [..\..\lib\QtGuid4.dll] Error 1
mingw32-make[2]: Leaving directory `C:/Qt/4.1.2/src/gui'
mingw32-make[1]: *** [debug] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/4.1.2/src/gui'
mingw32-make: *** [debug-gui] Error 2


That's all the errors it shows me on console... damn console... I can't post the first lines.. as it's too long for the windows 'console'

is there a way to compile on linux for windows? :( as I have to work on xp in a vmware on this fedora thats a pentium 3 550Mhz with 192MB on ram and it's used by at least 4 users at the same time...

If there's a way to get the plugins from somewhere:p .. for a Qt 4.1.2 Open Source for windows.. xp with MinGW 3.4