QT and MYSQL on Windows 7 64-Bit
I have been trying to install MYSQL for over 2 weeks now without any success.
Hopefully anyone can walk me through it. I will try to give you as much information as possible.
1. I am using Microsoft Windows 7 Professional 64-Bit version.
2. I downloaden Qt SDK from http://qt.nokia.com/products/ (the left one containing Qt 4.7.4, Creator and Qt Quick)
3. I downloaden MYSQL from dev.mysql.com/downloads/mysql/ and chose the Windows (x86, 32-bit), MSI Installer *
I tried like (seriously) way over 20 tutorials but none worked out. The one I think was best was the one located at
Anyways, when I open Qt4.7.3 for Desktop (MinGW) it does NOT recognise the qmake command. I have to use the
Qt4.7.4 for Desktop (MinGW) program. This one does recognise the qmake command.
When I follow the tutorial and enter the command:
qmake “INCLUDEPATH+=%mysql%\include” “LIBS+=%mysql%\lib\libmysql.lib” -o Makefile mysql.pro
I reveive this error four times:
WARNING: (internal):1: Unescaped backslasher are deprecated.
Anyways, I read on the internet that more people had this error, but when proceeding it didnt matter to them so I
tried to proceed to the next command which is:
This gives me a load of text and at the end the following error:
It does not make the four file which I need to get.
So, long story short. HELP ME OUT! lol
Been on this for way over 2 weeks and I am getting a bit frustrated lol. Hope someone can help me with
this problem and walk me through this process step by step.
If talking to me directly on MSN would help the process then no problem, I will post the solution on here
afterwards to help other people with the same problem out.
Have a nice (pre) weekend and thanks in forward if you are going to try to help me out ;)
- I read that 64-bit is currently unsupported so I took the 32-bit MSI installer.
well, it is still not working correctly.
When I type in this:
qmake “INCLUDEPATH+=e:\MYSQLínclude” “LIBS+=e:\MYSQL\lib\libmysql.lib” -o Makefile mysql.pro
I get 3 errors all saying:
WARNING: <internal>:1: Unescaped Backslashes are deprecated
When I type in mingw32-make I get a longgggg list of tekst some stuff like:
E:\Qt\QtSources\4.7.3\src\plugins\sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql,cpp:1365: undefined reference to ‘mysql_list_tables@8’
think it are about 30 errors or something like that.
All the way down it says:
mingw32-make: *** [debug] Error 2
Ohhh good to know Volker, thanks (again lol)!
I will re-download everything tomorrow and I will retry everything from scratch to make
sure I am using all the right stuff, and doing it the right way.
If by any reason the process would still fail, I will post the error here. If I succeed in installing
MySQL I will post it here to ;)
Well, I did the following guys:
1. I reinstalled my complete computer (Windows 7 Professional 64-Bit).
2. I downloaded QtSDK 4.7.4 and installed it at E:\ drive
3. I downloaded MySQL Server 5.5 and installed it at C:\ drive
4. Followed the tutorial (in my 1st post) but now again, different errors.
Since I have been trying to get MySQL working for over a month almost, perhaps
someone who has experience installing MySQL with Qt on a Windows 7 machine would
be so kind to help me out using a tool like TeamViewer or something so he can control
my computer and install it for me ?
It would only take like 5 minutes in total. I will have all files ready which you need.
I hope someone would be so kind, since I am really getting frustrated about how hard
it can be to just get MySQL working in C++ (Qt) lol.
Are you using MySQL 32 bit and Qt SDK 32 bit installer? Why don’t you give us the full path for you MySQL and Qt SDK installation, maybe I can put the correct command for you to test?
It looks like it cannot find libmysql.lib. You can test whether you’ve set the mysql variable correctly by using
- cd %mysql%
- cd lib
There should be a libmysq.lib in it.