PDA

View Full Version : Qt Application with Mysql on customer/client/another computer



wiralim
8th April 2012, 13:35
This thread is a tutorial for Developer who wants to run Qt application on another computer (without installing Qt SDK/Qt Creator on it).

I have tried this before.

My application is a simple application for inputing data to the database through the Qt Application (.exe file). Before you run the application on the computer (another computer) make sure you have installed My SQL on it, otherwise there would be no database on another computer. i recommend download the msi installer and the x86-32 bit one.
here is the link : http://dev.mysql.com/downloads/installer/

steps for running Qt Application on another computer with database connected :
1. download and install Dependency Walker (mine is verion 2.2), here is the link : http://www.dependencywalker.com/

2. Extract the dependency walker (wherever the directory is) and run the .exe file. after you run it, Use the dependency walker to open the Qt Application .exe file

3. You should able to see the dll and others file that listed on the dependency walker, like this :
7567
Search for that 7 listed file (below the testing.exe), and copy it to another computer in the same folder : C:\Program Files (x86)\MyProgram (this is my folder).

4. copy the Qt application .exe file to the same folder as the 7 file listed on dependency walker. If on my folder is : C:\Program Files (x86)\MyProgram

5. Create a subfolder sqldrivers inside MyProgram folder, and put 4 files in it : qsqlmysql4.dll, qsqlmysqld4.dll, libqsqlmysqld4.a, libqsqlmysql4.a

6. finally copy libmysql.dll to MyProgram folder (where the Qt application .exe file in it). get the libmysql.dll on your MySQL directory, eg : C:\Program Files (x86)\MySQL\MySQL Server 5.5\lib

7. Run the Qt application .exe

Taaaddddaaaaa~~~~ it works....:cool:

Lykurg
8th April 2012, 16:01
For what do you need the debug plugins?

sankarsankar
30th October 2012, 14:22
Thank you so much its working fine