PDA

View Full Version : Linker errors at building MySQL for Qt (Windows)



anteevy
13th October 2010, 17:56
Hey there,
I'm trying to build MySQL for Qt under Windows (MinGW). It worked fine on my Netbook (Win7 Standard 32bit), but I'm getting tons of linker errors on my PC (Win7 Prof 64bit) in QSQL_MYSQL.cpp, such as "undefined reference to mysql_free_result@4".

Here an image: http://www.anteevy.de/upload/temp/cmd.png

I used this guide: http://www.qtcentre.org/wiki/index.php?title=Building_the_QMYSQL_plugin_on_Wind ows_using_MinGW

Any ideas?

gboelter
14th October 2010, 09:12
I used this guide: http://www.qtcentre.org/wiki/index.php?title=Building_the_QMYSQL_plugin_on_Wind ows_using_MinGW
That's a little bit old, have you tried this: http://doc.qt.nokia.com/4.6/sql-driver.html

anteevy
14th October 2010, 10:36
Yes, I looked there too and tried it. But I don't see much of a difference there besides leaving out the "-o Makefile" and building directly from the lib without converting it to .a before. Same linker errors :(

gboelter
14th October 2010, 10:50
I can't really help you, bc I don't have a Windows/64bit. But the error message normally means, there is either a library missing or the library exist, but it's a wrong version, to old for example.

I would suggest to uninstall the whole mysql-stuff und then install it again. Should not be a big deal.

anteevy
14th October 2010, 18:03
Crazy, I reinstalled it and now it works. I'm getting afraid of the power of randomness :P

gboelter
14th October 2010, 18:43
Crazy, I reinstalled it and now it works. I'm getting afraid of the power of randomness :P


That's not because randomness, that's a feature of windows ...

In other words, that's the only bad thing with Linux, with Linux you don't have fun like this ... :D