PDA

View Full Version : QMYSQL plugin win64 7 tutorial



zim
5th December 2010, 00:32
./tmp\obj\debug_shared\qsql_mysql.o:C:\Qt\qt\src\sql/drivers/mysql/qsql_mysql.cp
p:1507: undefined reference to `mysql_real_escape_string@16'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [..\..\lib\QtSqld4.dll] Error 1
mingw32-make[2]: Leaving directory `C:/Qt/qt/src/sql'
mingw32-make[1]: *** [debug-all] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/qt/src/sql'
mingw32-make: *** [sub-sql-make_default-ordered] Error 2

That it the error that I get when I run mingw32-make.

I have followed not less than 5 tutorials on installing the QMYSQL plugin. Is there another way to go around this since the tutorials do not work for my os.

Thanx in advance.

zeb
7th December 2010, 09:08
Hi,

I have written a tutorial, in French, which I plan to translate. Until then, you may follow the instructions as they are quite obvious, even untranslated, at:
http://www.developpez.net/forums/d1007601/c-cpp/bibliotheques/qt/ressources-qt/articles/compilation-qmysql-sous-windows-mingw/

This is also under Win7 64-bit, using MinGW.
Hope this helps.

ChrisW67
7th December 2010, 21:50
This looks like a typical Mysql libraries are not in the library search path problem. That is, the -L option to configure or LIBS value in your qmake call is incorrect; see http://doc.qt.nokia.com/4.7/sql-driver.html#qmysql

If you want assistance then you need to tell us what you have actually done.

zim
7th December 2010, 23:27
Thanx everyone. I gave up on setting the QMYQSL driver in win64 7. I am going to use my win32 which works.

Thanx for the replies.