lyucs
15th July 2010, 01:11
Hello there,
I need to use MySql in Qt, and it's all good to go, classes, methods... except for one little thing... My program can't connect to MySql.
I have tried a lot of things, like following Qt doc, looking up in the internet, but nothing seems to work.
(I've tried finding threads in QtCentre forum, but I think I didn't find specifically my problem.... I think.)
Therefore, as a last resort, I'm humbly asking here if someone can point out what the heck I'm doing wrong...
Like the Doc says, I use configure as:
" configure -platform win32-g++ -static -release -qt-sql-sqlite -qt-sql-mysql -l mysql -I c:\mysql\include -L c:\mysql\lib\opt -fast "
(i haven't tried -plugin-sql-mysql instead of -qt-sql-sqlite but i don't think that's the problem)
and then run mingw32-make as the result of configure tells me to, after some 10 to 20 minutes i get :
g++ -enable-stdcall-fixup - Wl, -enable-auto-import -Wl, -enable-runtime-pseudo-reloc - Wl, -subsytem,console -mthreads -Wl -o ..\..\bin\rcc.exe tmp/obj/release_shared/rcc.0 tmp/obj/release_shared/main.o -lmysql -Lc:\mysql\lib\opt -L C:/Qt/2010.02.1/qt/src/tools/
bootstrap/release -lbootstrap -luser32 c:/qt/2010.02.1/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe
e: cannot find -lmysql
collect2: ld returned 1 exit status
mingw32-make[4]: *** [..\..\..\bin\rcc.exe] Error 1
mingw32-make[4]: Leaving directory C:/Qt/2010.02.1/qt/src/tools/rcc'
mingw32-make[3]: *** [release] Error 2
mingw32-make[3]: Leaving directory C:/Qt/2010.02.1/qt/src/tools/rcc'
mingw32-make[2]: *** [all] Error 2
mingw32-make[2]: Leaving directory C:/Qt/2010.02.1/qt/src/tools/rcc'
mingw32-make[1]: *** [sub-rcc-make-default-ordered] Error 2
mingw32-make[1]: Leaving directory C:/Qt/2010.02.1/qt
mingw32-make: *** [all] Error 2
Thank you for your time!
I need to use MySql in Qt, and it's all good to go, classes, methods... except for one little thing... My program can't connect to MySql.
I have tried a lot of things, like following Qt doc, looking up in the internet, but nothing seems to work.
(I've tried finding threads in QtCentre forum, but I think I didn't find specifically my problem.... I think.)
Therefore, as a last resort, I'm humbly asking here if someone can point out what the heck I'm doing wrong...
Like the Doc says, I use configure as:
" configure -platform win32-g++ -static -release -qt-sql-sqlite -qt-sql-mysql -l mysql -I c:\mysql\include -L c:\mysql\lib\opt -fast "
(i haven't tried -plugin-sql-mysql instead of -qt-sql-sqlite but i don't think that's the problem)
and then run mingw32-make as the result of configure tells me to, after some 10 to 20 minutes i get :
g++ -enable-stdcall-fixup - Wl, -enable-auto-import -Wl, -enable-runtime-pseudo-reloc - Wl, -subsytem,console -mthreads -Wl -o ..\..\bin\rcc.exe tmp/obj/release_shared/rcc.0 tmp/obj/release_shared/main.o -lmysql -Lc:\mysql\lib\opt -L C:/Qt/2010.02.1/qt/src/tools/
bootstrap/release -lbootstrap -luser32 c:/qt/2010.02.1/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe
e: cannot find -lmysql
collect2: ld returned 1 exit status
mingw32-make[4]: *** [..\..\..\bin\rcc.exe] Error 1
mingw32-make[4]: Leaving directory C:/Qt/2010.02.1/qt/src/tools/rcc'
mingw32-make[3]: *** [release] Error 2
mingw32-make[3]: Leaving directory C:/Qt/2010.02.1/qt/src/tools/rcc'
mingw32-make[2]: *** [all] Error 2
mingw32-make[2]: Leaving directory C:/Qt/2010.02.1/qt/src/tools/rcc'
mingw32-make[1]: *** [sub-rcc-make-default-ordered] Error 2
mingw32-make[1]: Leaving directory C:/Qt/2010.02.1/qt
mingw32-make: *** [all] Error 2
Thank you for your time!