PDA

View Full Version : Problem with compiling MySQL Plugin (Win7 x64)



GwynBleidD
29th March 2011, 00:01
I have an problem with compiling MySQL Plugin. I've done bellow steps:


Installed latest Qt SDK
Installed MinGW Utils
Installed MySQL 5.1.56 (also tried latest)
reimp -d libmysql.lib
dlltool -k -d libmysql.def -l libmysql.a
qmake "INCLUDEPATH +=c:\mysql51\include" "LIBS +=c:\mysql51\lib\opt\libmysql.lib" mysql.pro
mingw32-make


And on the last step (in red) gives me a lot of errors:


mingw32-make -f Makefile.Debug all
mingw32-make[1]: Entering directory `C:/Qt/2010.05/qt/src/plugins/sqldrivers/mys
ql'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -mthreads -Wl -shared -Wl,--out-implib,c:\Qt\2010.05\qt\plugins\sqldrivers\li
bqsqlmysqld4.a -o ..\..\..\..\plugins\sqldrivers\qsqlmysqld4.dll tmp/obj/debug_s
hared/main.o tmp/obj/debug_shared/qsql_mysql.o tmp/obj/debug_shared/moc_qsql_mys
ql.o -L"c:\Qt\2010.05\qt\lib" -L"c:\Qt\2010.05\qt\lib" tmp\obj\debug_shared\qsq
lmysqld_resource_res.o c:\mysql51\lib\opt\libmysql.lib -lQtSqld4 -lQtCored4
Creating library file: c:\Qt\2010.05\qt\plugins\sqldrivers\libqsqlmysqld4 .a
tmp/obj/debug_shared/main.o: In function `ZN18QMYSQLDriverPlugin6createERK7QStri
ng':
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/main.cpp:63: undefined reference t
o `__gxx_personality_sj0'
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/main.cpp:63: undefined reference t
o `_Unwind_SjLj_Register'
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/main.cpp:65: undefined reference t
o `_Unwind_SjLj_Resume'
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/main.cpp:68: undefined reference t
o `_Unwind_SjLj_Unregister'
tmp/obj/debug_shared/main.o: In function `ZNK18QMYSQLDriverPlugin4keysEv':
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/main.cpp:72: undefined reference t
o `__gxx_personality_sj0'
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/main.cpp:72: undefined reference t
o `_Unwind_SjLj_Register'

...

C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/../../../../include/QtCore/../../s
rc/corelib/thread/qbasicatomic.h:(.text$_ZN19QMYSQLResultPrivateD0Ev[QMYSQLResul
tPrivate::~QMYSQLResultPrivate()]+0x31): undefined reference to `_Unwind_SjLj_Re
gister'
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/../../../../include/QtCore/../../s
rc/corelib/thread/qbasicatomic.h:(.text$_ZN19QMYSQLResultPrivateD0Ev[QMYSQLResul
tPrivate::~QMYSQLResultPrivate()]+0x8c): undefined reference to `_Unwind_SjLj_Re
sume'
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/../../../../include/QtCore/../../s
rc/corelib/thread/qbasicatomic.h:(.text$_ZN19QMYSQLResultPrivateD0Ev[QMYSQLResul
tPrivate::~QMYSQLResultPrivate()]+0xc2): undefined reference to `_Unwind_SjLj_Un
register'
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/../../../../include/QtCore/../../s
rc/corelib/thread/qbasicatomic.h:(.text$_ZN19QMYSQLResultPrivateD1Ev[QMYSQLResul
tPrivate::~QMYSQLResultPrivate()]+0xc): undefined reference to `__gxx_personalit
y_sj0'
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/../../../../include/QtCore/../../s
rc/corelib/thread/qbasicatomic.h:(.text$_ZN19QMYSQLResultPrivateD1Ev[QMYSQLResul
tPrivate::~QMYSQLResultPrivate()]+0x31): undefined reference to `_Unwind_SjLj_Re
gister'
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/../../../../include/QtCore/../../s
rc/corelib/thread/qbasicatomic.h:(.text$_ZN19QMYSQLResultPrivateD1Ev[QMYSQLResul
tPrivate::~QMYSQLResultPrivate()]+0x8c): undefined reference to `_Unwind_SjLj_Re
sume'
C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysql/../../../../include/QtCore/../../s
rc/corelib/thread/qbasicatomic.h:(.text$_ZN19QMYSQLResultPrivateD1Ev[QMYSQLResul
tPrivate::~QMYSQLResultPrivate()]+0xc2): undefined reference to `_Unwind_SjLj_Un
register'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [..\..\..\..\plugins\sqldrivers\qsqlmysqld4.dll] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/2010.05/qt/src/plugins/sqldrivers/mysq
l'
mingw32-make: *** [debug-all] Error 2


I've cutted out large part of it, because it's nearly the same.

Google gives me answer that it might be problem with two different MinGW installed (i have installed DevCpp), so i cutted out oldest MinGW from PATH, but still the same...

What else may be wrong?

GwynBleidD
2nd April 2011, 11:46
Anyone can help me?

GwynBleidD
18th April 2011, 18:49
I'm fighting with that for 3 weeks, nothing helps. Anyone has the solution?

GwynBleidD
24th April 2011, 11:13
Problem solved!

I used mysql-essential-5.1.56-win32, copied libmysql.lib into plugin directory, executed reimp and dlltool in this directory and executed: qmake "INCLUDEPATH +=c:\mysql51\include" "LIBS +=-L./" mysql.pro

Also i configured mysql server after installation